logo       

RE: AsyncAppender not working: msg#00029

Subject: RE: AsyncAppender not working
Unless I'm missing something, it appears to be impossible to configure
log4cxx to use AsyncAppender.  Is there anybody out there who has
actually used it?  If so, can you show me how your config file looks?

Thanks,

Moshe


> -----Original Message-----
> From: Moshe Matitya [mailto:Moshe.Matitya@xxxxxxxxxx] 
> Sent: Thursday, June 21, 2007 8:40 PM
> To: log4cxx-user@xxxxxxxxxxxxxxxxxx
> Subject: AsyncAppender not working
> 
> I have been unable to get the AsyncAppender to work.  For 
> every appender that is added to the AsyncAppender, the 
> following error message appears:
> 
>     No appender named [<name>] could be found.
> 
> And not surprisingly, no logging happens.
> 
> I whittled this down to a simple example using an 
> AsyncAppender with two attached appenders.  Here is the config file:
> 
>     <?xml version="1.0" encoding="UTF-8" ?>
>     <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> 
>     <log4j:configuration 
> xmlns:log4j='http://jakarta.apache.org/log4j/'
>             debug="true">
> 
>         <appender name="CONSOLE"
>                 class="org.apache.log4j.ConsoleAppender">
>             <layout class="org.apache.log4j.PatternLayout">
>                 <param name="ConversionPattern"
>                         value="%d [%t] %-5p %c - %m%n" />
>             </layout>
>         </appender>
> 
>         <appender name="FILE"
>                 class="org.apache.log4j.FileAppender">
>             <param name="File" value="Sample.log" />
>             <param name="Append" value="false" />
>             <layout class="org.apache.log4j.PatternLayout">
>                 <param name="ConversionPattern"
>                         value="%d [%t] %-5p %c - %m%n" />
>             </layout>
>         </appender>
> 
>         <appender name="ASYNC"
>                 class="org.apache.log4j.AsyncAppender">
>             <param name="LocationInfo" value="true" />
>             <appender-ref ref="CONSOLE" />
>             <appender-ref ref="FILE" />
>         </appender>
> 
>         <root>
>             <level value="debug" />
>             <appender-ref ref="ASYNC" />
>         </root>
> 
>     </log4j:configuration>
> 
> And here is the log4cxx debug output:
> 
>     log4cxx: Threshold ="".
>     log4cxx: Level value for root is [debug].
>     log4cxx: OptionConverter::toLevel: no class name 
> specified, level=[debug]
>     log4cxx: root level set to DEBUG
>     log4cxx: Class name: [org.apache.log4j.AsyncAppender]
>     log4cxx: Setting option name=[LocationInfo], value=[true]
>     log4cxx: Attaching appender named [CONSOLE] to appender 
> named [ASYNC].
>     log4cxx: No appender named [CONSOLE] could be found.
>     log4cxx: Attaching appender named [FILE] to appender 
> named [ASYNC].
>     log4cxx: No appender named [FILE] could be found.
>     log4cxx: Adding appender named [ASYNC] to logger [root].
> 
> When I change the root logger's appender from "ASYNC" to 
> "CONSOLE" or "FILE"
> (i.e., bypassing the AsyncAppender), then everything works fine.
> 
> Am I doing something wrong here?
> 
> I am using log4cxx 0.10.0,
> taken from <http://littletux.homelinux.org/log4cxx> on June 21.
> I am running Windows XP SP2, with Visual C++ 6.0 SP6.
> 
> Thanks,
> 
> Moshe
> 



<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