Skip to Content.
Sympa Menu

perfsonar-dev - Re: [pS-dev] Writing to SYSLOG

Subject: perfsonar development work

List archive

Re: [pS-dev] Writing to SYSLOG


Chronological Thread 
  • From: Fausto Vetter <>
  • To: Roman Lapacz <>
  • Cc: Cándido Rodríguez Montes <>, " List" <>, Roman Lapacz <>
  • Subject: Re: [pS-dev] Writing to SYSLOG
  • Date: Wed, 18 Jun 2008 11:16:55 +0100

Hi Roman,

Just 2 concerns:

- may you define you are using TCP instead of UDP?

- may you change the port number?

Thanks,
Fausto

Roman Lapacz wrote:
Cándido Rodríguez Montes wrote:
Hi,
for the perfSONAR 3.1 all perfSONAR services have to write their logs into the SYSLOG. As all Java developers we are using the same log4j.properties, I think it's a good idea to have the same one for the new requirement. Has anybody done it so far?

I've just tested syslogging with log4j and it works.

Add to your log4j.properties file (for example at the end of the file) the following lines

log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender
log4j.appender.SYSLOG.syslogHost=127.0.0.1
log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout
log4j.appender.SYSLOG.layout.ConversionPattern=%d %5p - %m%n


and update log levels lines this way:

log4j.logger.sonar-debug=DEBUG, SYSLOG, psRootAppender
log4j.logger.sonar-info=INFO, SYSLOG, psRootAppender
log4j.logger.sonar-warn=WARN, SYSLOG, psRootAppender
log4j.logger.sonar-error=ERROR, SYSLOG, psRootAppender
log4j.logger.sonar-fatal=FATAL, SYSLOG, psRootAppender


Roman





I've found some good information about how to configure log4j for writing into SYSLOG at:
http://threebit.net/mail-archive/tomcat-users/msg00219.html
http://wiki.apache.org/logging-log4j/syslog

Regards

--
Cándido Rodríguez Montes E-mail: <mailto:>
Middleware warrior Tel:+34 955 05 66 13
Red.ES/RedIRIS
Edificio CICA
Avenida Reina Mercedes, s/n
41012 Sevilla
SPAIN









Archive powered by MHonArc 2.6.16.

Top of Page