logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kirk Benson" <kirk.ben...@brokat.com>
Subject RE: New user question: How to use the SMTPAppender? (any help appreciated)
Date Fri, 12 Jan 2001 20:54:46 GMT
According to the javadoc, the Appender options are case-sensitive.
Therefore specify options as To, From, SMTPHost, and Subject.

-----Original Message-----
From: José Vicente Núñez Zuleta [mailto:josevnz@yahoo.com]
Sent: Friday, January 12, 2001 3:43 PM
To: log4j-user@jakarta.apache.org
Subject: New user question: How to use the SMTPAppender? (any help
appreciated)


Greetings

I want to be able to report all the errors to Stdout
and to a email address; I got the following code:


// Obtenemos la configuración para el registro de
eventos

prop.load(new BufferedInputStream(new
FileInputStream(PROPERTY_FILE)));

PropertyConfigurator.configure(prop);
cat.debug("Debug enabled.");


And here are the contents of the properties file:
# Parámetros para controlar la verbosidad de registro
de eventos
log4j.rootCategory=DEBUG, PoolManager, emailerror
log4j.appender.PoolManager=org.apache.log4j.FileAppender
log4j.appender.PoolManager.File=System.out
log4j.appender.PoolManager.layout=org.apache.log4j.PatternLayout

# Imprima la fecha en el formato ISO 8601
log4j.appender.PoolManager.layout.ConversionPattern=%d
[%t] %-5p %c - %m%n
# Configuración para el "appender" de correo
electrónico
log4j.appender.emailerror=org.apache.log4j.SMTPAppender
log4j.appender.emailerror.from=josevnz@yahoo.com
log4j.appender.emailerror.smtp_host=xxxx.yyy.com
log4j.appender.emailerror.subject=xxxx.com:
PoolManager error
log4j.appender.emailerror.to=josevnz@yahoo.com
log4j.appender.emailerror.layout=org.apache.log4j.PatternLayout
log4j.appender.emailerror.layout.ConversionPattern=%d
[%t] %-5p %c - %m%n

 Does anybody know if i'm making a mistake? I was
unable to find any more material about this kind of
configuration



Thanks in advance.


José V.

_________________________________________________________
Do You Yahoo!?
Obtenga su dirección de correo-e gratis @yahoo.com
en http://correo.espanol.yahoo.com

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


Mime
View raw message