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

Reply via email to