Я пытаюсь настроить slf4j с log4j в моем java-приложении, но у меня ничего не получается.Мой файл log4j выглядит так:
log4j.rootLogger=DEBUG,stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %X{file} %c{1} - %m%n
log4j.logger.lt.hltech.tools.webcrawler=DEBUG,webcrawler
log4j.additivity.lt.hltech.ws.webcrawler=false
log4j.logger.webcrawler=DEBUG,webcrawler
log4j.additivity.webcrawler=false
log4j.appender.webcrawler=org.apache.log4j.DailyRollingFileAppender
log4j.appender.webcrawler.File=D:\\Projects\\IntellijIdeaProjects\\hltech_tools\\WebCrawler\\crawling.log
log4j.appender.webcrawler.DatePattern='.'yyyy-MM-dd
log4j.appender.webcrawler.layout=org.apache.log4j.PatternLayout
log4j.appender.webcrawler.layout.ConversionPattern=%d [%t] %-5p %X{file} %c{1} %m%n
log4j.appender.webcrawler.ImmediateFlush=true
MANIFEST.MF в файле jar выглядит так:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.5.0_20-b02 (Sun Microsystems Inc.)
Main-Class: lt.hltech.tools.webcrawler.main.TopicalCrawler
Class-Path: ../../lib/antlr-2.7.6.jar ../../lib/asm-attrs.jar ../../li
b/asm.jar ../../lib/axis-1.4.jar ../../lib/axis-ant-1.4.jar ../../lib
/axis-spring-provider-0.1.0.jar ../../lib/cglib-2.1.3.jar ../../lib/c
heckstyle-5.4-all.jar ../../lib/checkstyle-5.4.jar ../../lib/commons-
collections-2.1.1.jar ../../lib/commons-logging-1.1.1.jar ../../lib/c
ommons-logging-adapters-1.1.1.jar ../../lib/commons-logging-api-1.1.1
.jar ../../lib/dom4j-1.6.1.jar ../../lib/ehcache-1.2.3.jar ../../lib/
hibernate-annotations.jar ../../lib/hibernate-commons-annotations.jar
../../lib/hibernate-entitymanager.jar ../../lib/hibernate-tools.jar
../../lib/hibernate3.jar ../../lib/javassist.jar ../../lib/jaxen-1.1.
1.jar ../../lib/jaxrpc-1.1-axis14.jar ../../lib/jdbc2_0-stdext.jar ..
/../lib/jericho-html-3.1.jar ../../lib/jing.jar ../../lib/jta.jar ../
../lib/junit.jar ../../lib/log4j-1.2.9.jar ../../lib/mysql-connector-
java-5.1.6-bin.jar ../../lib/ontopia-vizlet.jar ../../lib/ontopia.jar
../../lib/pmd-4.2.6.jar ../../lib/signed-vizlet.jar ../../lib/slf4j-
api-1.5.11.jar ../../lib/slf4j-log4j12-1.5.11.jar ../../lib/xercesImp
l-2.6.2.jar ../../src/main/config/log4j.properties
Я добавил slf4j-log4j12-1.5.11.jar, log4j-1.2.9.jar, slf4j-api-1.5.11.jar и даже log4j.properties в моем classpath.Но регистрация не работает.
Есть идеи как это решить?Спасибо