logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete Rowley <p...@openrowley.com>
Subject Appenders in configuration issue
Date Wed, 12 May 2004 19:07:06 GMT
I have some code which uses file configuration for log4cxx, pretty much as in 
the sample in the "short introduction to log4cxx".  However, whenever the 
file is parsed I get the following message:

Could not instantiate class [org.apache.log4j.ConsoleAppender].
Class 'org.apache.log4j.ConsoleAppender' not found
Could not instantiate appender named "A1".
No appenders could be found for logger (pam_eda.auth).
Please initialize the log4cxx system properly.

The config file is as in the example:
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=DEBUG, A1


# A1 is set to be a ConsoleAppender.

# A1 uses PatternLayout.
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

The code that intiates configuration:

//	BasicConfigurator::configure();
	String propertyFileName = "/etc/pam_eda_log4cxx";

If I comment out the PropertyConfigurator line and uncomment BasicConfigurator 
I get console output just fine.

Is there a step I am missing?

Build system: Suse 9.0, kernel 2.4.21-202-default, gcc 3.3.1


View raw message