logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graf Martin" <martin.g...@ntb.ch>
Subject Error using SMTPAppender
Date Thu, 14 Apr 2005 13:44:21 GMT


I have no idea what's the problem in the following small program. I
tried to use a SMTPAppender.


Anyone a tip?    Thanks a lot !!



/* Cpp Test Code */

LoggerPtr logger2 = Logger::getRootLogger();



logger2->warn("warn message");

logger2->debug("debug message");

logger2->error("error message");

logger2->fatal("fatal message");



/* Error message */

Threshold ="null"

Level value for root is [debug]

OptionConverter::toLevel: no class name specified, level="debug]

Root level set to debug

Class name: [org.apache.log4j.net.SMTPAppender]

Could not create an appender. Reported error follows.

Class 'org.apache.log4j.net.SMTPAppender' not found

Appender named [EMAIL] not ofund.

No appenders could be found for logger <root>

Please initialise the log4cxx system properly



/* xml - File */

<log4j:configuration debug="true"


  <appender name="EMAIL" class="org.apache.log4j.net.SMTPAppender" >

    <param name="SMTPHost" value="mail-server.ntb.ch"/>

    <param name="To" value="ulrich.stadler@ntb.ch"/>

    <param name="From" value="martin.graf@ntb.ch"/>

    <layout class="org.apache.log4j.PatternLayout">

      <param name="ConversionPattern" value="%d %-5p %c - %m%n"/>





    <level value ="debug"/>

    <appender-ref ref="EMAIL" />






View raw message