logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Fernando.Matom...@thomson.com>
Subject RE: smtp logging does not work
Date Fri, 05 Aug 2005 08:15:10 GMT
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="true">
        
  <appender name="FILE" class="biz.minaret.log4j.DatedFileAppender">
    <param name="Directory" value="/usr/tmp"/>
    <param name="Prefix" value="reportrepo."/>
    <param name="Suffix" value=".log"/>
    <param name="Append" value="true"/>
    <param name="BufferedIO" value="false"/>
    <param name="BufferSize" value="8192"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{yy/MM/dd HH:mm:ss.SSS}
%-25x %-5p %-25c{1}: %m%n"/>
    </layout>
  </appender>

  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.PatternLayout">
           <param name="ConversionPattern" 
                            value="%d{yy/MM/dd HH:mm:ss.SSS} %-25x %-5p
%-25c{1}: %m%n"/>
    </layout>
  </appender>

  <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
		<param name="Threshold" value="INFO"/>
		<param name="To" value="foo@bar.baz"/>
		<param name="From" value="froboz@some.other"/>
		<param name="Subject" value="Information"/>
		<param name="SMTPHost" value="mymailhost"/>
		<param name="BufferSize" value="1"/>
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern"
value="%d{yy/MM/dd HH:mm:ss.SSS} %-5p %c%n%m"/>
		</layout>
  </appender>
	
  <root>
    <priority value ="debug"/>
    <appender-ref ref="CONSOLE"/>
    <appender-ref ref="FILE"/>
    <appender-ref ref="SMTP"/>
  </root>

</log4j:configuration>


-----Original Message-----
From: James Stauffer [mailto:stauffer.james@gmail.com] 
Sent: Thursday, August 04, 2005 3:29 PM
To: Log4J Users List
Subject: Re: smtp logging does not work

Posting your config file may help.

On 8/4/05, Fernando.Matomira@thomson.com <Fernando.Matomira@thomson.com>
wrote:
> Hello,
> 
>   I've tried configuring the SMTP appender both with properties and
with
> XML and I can't get it to work.

-- 
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message