zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From René Weinert <rene_wein...@hotmail.com>
Subject Log4j-Properties
Date Thu, 08 Dec 2011 20:32:51 GMT
Hello,

I’m using Zookeeper together with YCSB++ (a cloud benchmarking tool). When
executing this I get the warning:

 

“log4j:WARN No appenders could be found for logger
(org.apache.zookeeper.ZooKeeper).

log4j:WARN Please initialize the log4j system properly.

log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.”

 

I included the standard log4j.properties file of Zookeeper in the classpath
of my application but still keep getting this error. Do you have any idea on
how to solve this?

Indeed there are no appenders defined for org.apache.zookeeper.ZooKeeper
(see below) – could this be the reason? And how would these have to look
like?

 

Thanks

René

 

 

PS: Here the content of the log4j.properties (didn’t change anything from
the default):

 

#

# ZooKeeper Logging Configuration

#

 

# Format is "<default threshold> (, <appender>)+

 

# DEFAULT: console appender only

log4j.rootLogger=INFO, CONSOLE

 

# Example with rolling log file

#log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE

 

# Example with rolling log file and tracing

#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE

 

#

# Log INFO level and above messages to the console

#

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender

log4j.appender.CONSOLE.Threshold=INFO

log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout

log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} - %-5p
[%t:%C{1}@%L] - %m%n

 

#

# Add ROLLINGFILE to rootLogger to get log file output

#    Log DEBUG level and above messages to a log file

log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender

log4j.appender.ROLLINGFILE.Threshold=DEBUG

log4j.appender.ROLLINGFILE.File=zookeeper.log

 

# Max log file size of 10MB

log4j.appender.ROLLINGFILE.MaxFileSize=10MB

# uncomment the next line to limit number of backup files

#log4j.appender.ROLLINGFILE.MaxBackupIndex=10

 

log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout

log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} - %-5p
[%t:%C{1}@%L] - %m%n

 

 

#

# Add TRACEFILE to rootLogger to get log file output

#    Log DEBUG level and above messages to a log file

log4j.appender.TRACEFILE=org.apache.log4j.FileAppender

log4j.appender.TRACEFILE.Threshold=TRACE

log4j.appender.TRACEFILE.File=zookeeper_trace.log

 

log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout

### Notice we are including log4j's NDC here (%x)

log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} - %-5p
[%t:%C{1}@%L][%x] - %m%n

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message