webx3日志系统问题

之前工程搭起来的时候,用的日志是log4j,一直没有问题,前几天有同事添加新包依赖,把logback-classic-1.0.0.jar这个包也依赖进来,在启动的时候,发现日志输出的路径不对,一直纳闷不知道问题所在,后来看启动日志发现:
ERROR [STDERR] SLF4J: Class path contains multiple SLF4J bindings.
ERROR [STDERR] SLF4J: Found binding in [jar:file:/D:/temp/lookweb/target/lookweb.war/WEB-INF/lib/logback-classic-1.0.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
23:37:42,021 ERROR [STDERR] SLF4J: Found binding in [jar:file:/D:/temp/lookweb/target/lookweb.war/WEB-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
ERROR [STDERR] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[[/]] Initializing logback system
INFO [[/]] Could not find logback configuration file "/WEB-INF/logback.xml" in webapp context. Using default configurations.
ERROR [STDERR] INFO: configuring "logback" using jar:file:/D:/temp/lookweb/lookweb.war/WEB-INF/lib/citrus-webx-all-in-one-3.0.5.jar!/com/alibaba/citrus/logconfig/logback/logback-default.xml

在webx3既可以用logback也可以用log4j,但是logback-classic-1.0.0.jar和slf4j-log4j12-1.6.1.jar这两个包不能同时在工程中添加,需要用logback添加前面的包,否则用后面的,两个都添加,slf4j在找绑定的时候,就不知道该找谁了,会导致日志系统混乱,排查问题很难!

另外附上:logback的基础使用文章
http://hi.baidu.com/caijian5219999/blog/item/a6ad7bf9e9cb560da8d3118b.html

posted @ 2012-09-01 12:32  _zao123  阅读(600)  评论(0编辑  收藏  举报