logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Vicente Núñez Zuleta <jose...@yahoo.com>
Subject New user question: How to use the SMTPAppender? (any help appreciated)
Date Fri, 12 Jan 2001 20:43:03 GMT
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

Mime
View raw message