Hi Willem, Removing the 'test' scope has fixed my problems.
On Thu, Apr 24, 2014 at 11:35 PM, Willem Jiang <[email protected]>wrote: > It looks like the test scope dependency of slf4j-log4j12 doesn’t work > there. > Can you double check your eclipse class path to see if the slf4j-log4j12 > jar is there? > > -- > Willem Jiang > > Red Hat, Inc. > Web: http://www.redhat.com > Blog: http://willemjiang.blogspot.com (English) > http://jnn.iteye.com (Chinese) > Twitter: willemjiang > Weibo: 姜宁willem > > > > On April 24, 2014 at 8:46:29 PM, Stephen Cameron ( > [email protected]) wrote: > > Hi, > > > > I want to get Camel log info to a rolling file but cannot get it working > in > > Eclipse. I have all the right Maven dependencies and a log4j.properties > > file in src/main/resources. I see the following appear at the console > when > > I run my Camel application. > > > > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > > SLF4J: Defaulting to no-operation (NOP) logger implementation > > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for > further > > details. > > > > Can anyone help me? This seems a simple enough issue to solve but I am > bit > > rusty on all this at present. > > > > I don't see the log file being generated at all, here is the properties > file > > > > # Root logger option > > log4j.rootLogger=INFO, file, stdout > > > > # uncomment the following line to turn on Camel debugging > > log4j.logger.org.apache.camel=DEBUG > > > > # Direct log messages to a log file > > log4j.appender.file=org.apache.log4j.RollingFileAppender > > > log4j.appender.file.File=C:\\Users\\stevec\\workspace-juno\\mws\\log\\logging.log > > log4j.appender.file.MaxFileSize=1MB > > log4j.appender.file.MaxBackupIndex=1 > > log4j.appender.file.layout=org.apache.log4j.PatternLayout > > log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p > > %c{1}:%L - %m%n > > > > # Direct log messages to stdout > > log4j.appender.stdout=org.apache.log4j.ConsoleAppender > > log4j.appender.stdout.Target=System.out > > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout > > log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} > %-5p > > %c{1}:%L - %m%n > > > > This is what I have in the project pom.xml > > > > > > > > org.slf4j > > slf4j-api > > 1.7.5 > > > > > > org.slf4j > > slf4j-log4j12 > > 1.7.5 > > test > > > > > > log4j > > log4j > > 1.2.17 > > test > > > > > >
