Thank you Olli. This is what I needed.
I've made this in other way, but this one is the optimal one.
Just wonder why there is no examples in Log4j about Threshold parameter... (I've missed it in API, because I don't use it - only configurations files).
Best rgds and have a nice weekend,
Waldek
-----------------------------
Waldemar Thiel
e-mail: [EMAIL PROTECTED]
| "Olli Blackburn"
<[EMAIL PROTECTED]>
2004-01-09 18:09
|
|
<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:[EMAIL PROTECTED]
Sent: Friday, January 09, 2004 4:49 AM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
smime.p7s
Description: S/MIME Cryptographic Signature
