logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Boekhold <boekh...@yahoo.com>
Subject linking against static library of log4cxx
Date Mon, 02 Aug 2004 10:21:37 GMT
Hi,

I'm trying to link a program against the static log4cxx library (liblog4cxx.a,
under cygwin). The linking itself succeeds, but executing the resulting program
fails with:

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

Is static linking supported at all? If so, is there any magic required in the
link command?

Kind regards, Maarten

ps. I'm initializing log4cxx in this program with:

    Properties props;
    string s_log_pattern = "%d{yyyy/MM/dd HH:mm:ss.SSS} %-5p : %m%n";

    props.setProperty(string("log4j.appender.Console"),
                      string("org.apache.log4j.ConsoleAppender"));
    props.setProperty(string("log4j.appender.Console.layout"),
                      string("org.apache.log4j.PatternLayout"));
   
props.setProperty(string("log4j.appender.Console.layout.ConversionPattern"),
                      s_log_pattern);
    props.setProperty(string("log4j.rootLogger"),
                      string("ALL,Console"));

    LogManager::resetConfiguration();
    PropertyConfigurator::configure(props);



		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

Mime
View raw message