logo       

Re: Logging Configuration Across DLL Boundary: msg#00025

Subject: Re: Logging Configuration Across DLL Boundary
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. /.../ It looks like whatever log4cxx configuration I use does not carry over across the DLL boundary.
/../


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.

I have a similar problem with static libraries. I have a bunch of static libs, which all use log4cxx and declare their own logger hierarchy (descendant from the main app's logger). Whenever I log from the main app code, it's all good but when I go deep into the static lib code, I get an exception.
Tracing it, I saw that the problem is in Logger::getEffectiveLevel().
Looks like it tries to deduce the debugging level when it's not defined for this specific logger. So it goes up to its parent, up till it gets to a logger named "root" which has a null parent pointer. Problem is, this root logger is different from the main app root logger: different addresses, different data in the fields, namely the debugging level. For the classes in the static libs, their loggers are declared as static. Could this be the problem?

There are no DLLs involved in this situation.

What am I missing?

Many thanks

Dan




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe