logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anjib Mulepati <anji...@hotmail.com>
Subject Error using logging file
Date Thu, 16 Dec 2010 15:50:10 GMT
I have Logging.properties file as:

# Log4j configuration file.
  log4j.rootCategory=DEBUG, Console, File

  #
  # Console Appender
  #

  log4j.appender.console=org.apache.log4j.ConsoleAppender
  log4j.appender.console.layout=org.apache.log4j.PatternLayout
  log4j.appender.console.layout.ConversionPattern=%-5p [%t] - %m%n

  #
  # File Appender
  #

  log4j.appender.File=org.apache.log4j.FileAppender
  log4j.appender.File.file=logs/logfile.log
  log4j.appender.File.datePattern='.'yyyy-MM-dd
  log4j.appender.File.append=true
  log4j.appender.File.layout=org.apache.log4j.PatternLayout
  log4j.appender.File.layout.ConversionPattern=%-5p %d{ISO8601} [%t] - %m%n

When run the program I get error:

log4j:ERROR Could not find value for key log4j.appender.Console
log4j:ERROR Could not instantiate appender named "Console".
log4j:WARN No such property [datePattern] in org.apache.log4j.FileAppender.


What am I doing wrong?

Anjib

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message