You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Nandan S <na...@hp.com> on 2014/02/25 09:21:43 UTC

how to use errorHandler

Hi,
    I getting following error while using the errorHandler. Request help in
proper usage of errorHandler.
-----------------------------------------------------------------------------------------
log4cxx: Could not instantiate class
[org.apache.log4j.varia.FallbackErrorHandler].
log4cxx: Class not found: org.apache.log4j.varia.FallbackErrorHandler
-----------------------------------------------------------------------------------------

Following is my configuration file

<?xml version="1.0" encoding="UTF-8" ?>
 <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
 
  
  <appender name="appxConsoleAppender"
class="org.apache.log4j.ConsoleAppender">  
    
    
        <layout class="org.apache.log4j.PatternLayout">
            
        </layout>
  </appender>

  
  
  <appender name="appxNormalAppender" class="org.apache.log4j.FileAppender">
    
    
    
    <layout class="org.apache.log4j.PatternLayout">
      
    </layout>

    <errorHandler class="org.apache.log4j.varia.FallbackErrorHandler">
      <root-ref/>
      <appender-ref ref="appxConsoleAppender"/>
    </errorHandler>

  </appender>

  <root>
        <priority value="TRACE" />
        <appender-ref ref="appxNormalAppender"/> 
  </root>

</log4j:configuration>



--
View this message in context: http://apache-logging.6191.n7.nabble.com/how-to-use-errorHandler-tp44799.html
Sent from the Log4cxx - Users mailing list archive at Nabble.com.

Re: how to use errorHandler

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag Nandan S,
am Dienstag, 25. Februar 2014 um 10:14 schrieben Sie:

> Is my configuration file correct ?

It looked correct to me, but you can compare with:

trunk\src\test\resources\input\xml\fallback1.xml

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: how to use errorHandler

Posted by Nandan S <na...@hp.com>.
>Which version are you using? 0.10.0 has been released 2008-04-03, but 
>there were changes afterwards to fallbackerrorhandler.h and other 
>files regarding error handling afterwards. Additionally, there's a 
>test called errorhandlertestcase which seems to successfully use a 
>configuration with FallbackErrorHandler. 

>You could try using the current trunk codebase which builds and passes 
>the tests on most of the systems the current devs seem to use.

    Thanks. I will check the details. Is my configuration file correct ?



--
View this message in context: http://apache-logging.6191.n7.nabble.com/how-to-use-errorHandler-tp44799p44802.html
Sent from the Log4cxx - Users mailing list archive at Nabble.com.

Re: how to use errorHandler

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag Nandan S,
am Dienstag, 25. Februar 2014 um 09:21 schrieben Sie:

>     I getting following error while using the errorHandler. Request help in
> proper usage of errorHandler.
> -----------------------------------------------------------------------------------------
> log4cxx: Could not instantiate class
> [org.apache.log4j.varia.FallbackErrorHandler].
> log4cxx: Class not found: org.apache.log4j.varia.FallbackErrorHandler
> -----------------------------------------------------------------------------------------

Which version are you using? 0.10.0 has been released 2008-04-03, but
there were changes afterwards to fallbackerrorhandler.h and other
files regarding error handling afterwards. Additionally, there's a
test called errorhandlertestcase which seems to successfully use a
configuration with FallbackErrorHandler.

You could try using the current trunk codebase which builds and passes
the tests on most of the systems the current devs seem to use.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow