logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Please Help me for ErrorHandler in log4cxx: msg#00038

apache.logging.log4cxx.user

Subject: Please Help me for ErrorHandler in log4cxx


Hi friends
  I am using the Log4cxx in my application, But got a big problem at error handler.
 If suppose logs r going to record at server side and server goes down ,then throw  the FALLBACK ie handler we can divert the logs.
 I wrote the xml file for error handler,if one server goes down then divert the output to other server ,If logs r not diverting to handler server once the PRIMARY goes down.

My xmlconfigurator is as follows

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
        <appender name="PRIMARY" class="org.apache.log4j.net.SocketAppender">
             <param name="RemoteHost" value="localhost"/>
             <param name="Port" value="6044"/>
             <param name="ReconnectionDelay" value="5000"/>
             <errorHandler class="org.apache.log4j.varia.FallbackErrorHandler">
                 <param name="logger" value="root"/>
                 <root-ref/>
                 <logger-ref ref="Log_debug"/>
                 <logger-ref ref="Log_error"/>
                 <appender-ref ref="FALLBACK"/>
            </errorHandler>
        </appender>
  <appender name="FALLBACK" class="org.apache.log4j.net.SocketAppender">
    <param name="RemoteHost" value="localhost"/>
    <param name="Port" value="6045"/>
    <param name="ReconnectionDelay" value="5000"/>
  </appender>
  <logger name="Log_debug" additivity="false">
    <level value="debug"/>
    <appender-ref ref="PRIMARY"/>
  </logger>
  <logger name="Log_error" additivity="false">
    <level value="ALL"/>
    <appender-ref ref="PRIMARY"/>
  </logger>
  <root>
    <level value="ALL" />
    <appender-ref ref="PRIMARY"/>
  </root>
</log4j:configuration>


<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

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

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo