logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Logging Configuration Across DLL Boundary
Date Tue, 24 Aug 2004 23:08:33 GMT

On Aug 24, 2004, at 4:52 PM, Michaƫl CATANZARITI wrote:

> Hello,
> Can you be more precise and give code samples, please ?
> Regards,
> Combes, Chris M. wrote:
>> Folks,
>> I have an application which configures my logging system through a 
>> ProperyConfigurator. The application instantiates objects which are 
>> implemented in external DLLs. When instantiation occurs (e.g. in the 
>> constructor of whatever object) the logging configuration is lost. I 
>> can get around this by loading the configuration file again within 
>> each object, but I should not have to do this.
>> It looks like whatever log4cxx configuration I use does not carry 
>> over across the DLL boundary.
>> Is this intended behavior? Or is there some special method to get the 
>> configuration to carry forward into objets instantiated within a 
>> separate DLL?
>> I'm developing under MSVC++ 6.0.
>> Any help appreciated.
>> Thanks,
>> Chris

That behavior would be expected if the application DLL's were linked 
with log4cxx static library.  To share logging configurations, the 
application DLL's must be linked with a log4cxx dynamic library.  There 
may still be an issue, but please check that you aren't compiling with 
statically linked log4cxx.

View raw message