logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Olli Blackburn" <Olli.Blackb...@borland.com>
Subject RE: XML configuration help needed - 2 appenders - File for INFO priority and File plus SMTP for FATAl
Date Fri, 09 Jan 2004 17:09:01 GMT
<appender name="FILE" class="org.apache.log4j.XXXAppender">
<param name="Threshold" value="INFO"/> <!-- levels this appender emits
-->
...
</appender>

<appender name="SMTP" class="org.apache.log4j.XXXAppender">
<param name="Threshold" value="FATAL"/> <!-- levels this appender emits
-->
...
</appender>

<root>
<level value="INFO"/>
<appender-ref ref="FILE"/>
<appender-ref ref="SMTP"/>
</root>


Hope that's what you're looking for.

Olli

-----Original Message-----
From: Waldemar Thiel [mailto:thielw@incenti.pl] 
Sent: Friday, January 09, 2004 4:49 AM
To: log4j-user@logging.apache.org
Subject: XML configuration help needed - 2 appenders - File for INFO
priority and File plus SMTP for FATAl



Hello 

I'm trying to configure my log4j to work in this way: 

1/ log message with priority INFO should be logged only into file
(FileAppender) 
2/ log message with priority FATAL should be logged to same file as
priority INFO, but additionaly it should be send via SMTP server. 

Is such a configuration possible? I'm tried to configure log4j to work
in this way but always failed. 
Can some1 send me simple example of configuration using XML file? 

Best regards, Waldek 

-----------------------------
Waldemar Thiel
e-mail: thielw@incenti.pl



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message