logo       

Re: custom appenders and DOMConfigurator: msg#00014

Subject: Re: custom appenders and DOMConfigurator

On Nov 30, 2006, at 11:17 AM, George Uecker wrote:

I have a custom appender that is in a separate library because it has dependencies on some 3rd-party commercial libs. When I try to configure this appender, the DOMConfigurator says it can't find the class. What do I have to do to be able to use a custom appender that does NOT reside in the log4cxx lib?

TIA,

George

The problem is likely due to the registration either not occurring or occurring after the configuration file is processed. You somehow need to force the appender registration to occur before the configuration file is processed. To figure out how to force the order, you would need to know how configuration is triggered (explicit call or default configuration) and when (are their logging statements in static constructors that are triggering default configuration) and to make sure that your appender containing library is loaded and its registration code called before that.

How are you forcing your appender library to be loaded? Does your custom library show up when you look at the executable with depends, ldd or equivalent? You might try adding a call to MyAppender::registerClass() to your app somewhere that will precede the configuration. Calling registerClass() repeatedly is not harmful and should not be all that expensive.

If that doesn't fix the issue, then set break points on the registration code and default configuration and check that the registration code is being executed and whether it is prior to configuration?




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

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
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