logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Unnikrishnan Udinoor" <uudin...@Brocade.COM>
Subject On Static Linking - Could not instantiate class [org.apache.log4j.ConsoleAppender]
Date Wed, 28 Nov 2007 20:07:28 GMT
Hi,

I am using log4cxx 0.9.7 version. On dynamically linking to the log4cxx
library my C++ application works fine with the logging.
On changing the linking to static log4cxx , I get errors stating that
unable to instantiate the class.

Can someone help me to fix this issue ? Thanks a lot in Advance.

To be specific, this is the error I am getting.

	Could not instantiate class [org.apache.log4j.ConsoleAppender].
	Class 'org.apache.log4j.ConsoleAppender' not found
	Could not instantiate appender named "stdout".


	Could not instantiate class
[org.apache.log4j.RollingFileAppender].
	Class 'org.apache.log4j.RollingFileAppender' not found
	Could not instantiate appender named "R".


My log4j.proerties file is as follows:

	### 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{ABSOLUTE} [%t]
%-5p %c{1}:%L - %m%n

	log4j.appender.R=org.apache.log4j.RollingFileAppender
	log4j.appender.R.File=app.log

	log4j.appender.R.MaxFileSize=100KB
	# Keep one backup file
	log4j.appender.R.MaxBackupIndex=1

	log4j.appender.R.layout=org.apache.log4j.PatternLayout
	log4j.appender.R.layout.ConversionPattern=%d{ABSOLUTE} [%t] %-5p
%c{1}:%L - %m%n

	log4j.rootLogger=trace, stdout,R

Mime
View raw message