logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HJD <hamed_...@yahoo.com>
Subject Could not instantiate appender named "console"
Date Mon, 18 Oct 2010 06:55:39 GMT

Hi all,
I'm running my program and I want to log program activities using log4j.
First, I set the log4j to DEBUG level and to write in the file, but what is
written in the file is just at INFO level.
Second, I set it to write on the console and I get these errors:

log4j:ERROR Could not find value for key log4j.appender.console
log4j:ERROR Could not instantiate appender named "console".

and this is my log4j.properties file content:

# Root logger option
log4j.rootLogger=debug, console, file

# Direct log messages to a log file
log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.Threshold=DEBUG
log4j.appender.file.File=C:\\logfile.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L -
%m%n

# Direct log messages to stdout
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.console.Threshold=DEBUG
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=[%t:%p] %c: %m%n
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{ABSOLUTE} %5p %c{1}:%L -
%m%n


Does anyone have any idea?
Regards,
Hamed
-- 
View this message in context: http://old.nabble.com/Could-not-instantiate-appender-named-%22console%22-tp29987859p29987859.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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