log4j

Discussion in 'Java' started by sr, Apr 20, 2005.

  1. sr

    sr Guest

    Hallo,

    how can i use log4j SMTPAppender to send eMail for different eMail
    addresses.

    Is it possible to use something like a category?



    Level ERROR with category DEP_1 - email for
    Level ERROR with category DEP_2 - email for

    Example:
    <appender name="SMTP_ERROR" class="org.apache.log4j.net.SMTPAppender">
    <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
    <param name="Threshold" value="ERROR"/>
    <param name="To" value=""/>
    <param name="From" value=""/>
    <param name "category????????" value = "DEP_1"> ???????????????
    <param name="Subject" value="JBoss Sever Errors"/>
    <param name="SMTPHost" value="localhost"/>
    <param name="BufferSize" value="10"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
    </layout>
    </appender>





    Thank a lot!!!

    Staszek
    sr, Apr 20, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alexandra Stehman

    eclipse, junit, log4j, & finding log4j.xml

    Alexandra Stehman, Jan 19, 2004, in forum: Java
    Replies:
    0
    Views:
    5,758
    Alexandra Stehman
    Jan 19, 2004
  2. Alex Hunsley
    Replies:
    2
    Views:
    12,915
    =?ISO-8859-15?Q?Fr=E9d=E9ric_G=E9din?=
    May 28, 2004
  3. Rodolfo
    Replies:
    0
    Views:
    946
    Rodolfo
    Jul 12, 2004
  4. joes
    Replies:
    1
    Views:
    2,123
  5. Gianni Galore
    Replies:
    0
    Views:
    1,257
    Gianni Galore
    Sep 8, 2010
Loading...

Share This Page