logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maarten Bosteels" <mbosteels....@gmail.com>
Subject Re: Syslog logging configuration
Date Thu, 09 Nov 2006 21:12:15 GMT
I vaguely remember that we had security issues when we started using the
SyslogAppender. Make sure you have the privileges to connect to it via a
socket.

Most C/C++ apps use the syslog system call, but I believe log4j uses a TCP
socket
to talk to the syslog daemon.

Maarten

On 11/9/06, Joni Hahkala <joni.hahkala@cern.ch> wrote:
>
> Hi,
>
> I'm trying to log to syslog, but I can't get it to work.
>
> Bought the manual, but it doesn't say anything, and googling for it I
> only found one example in the manual review.
>
> So, I'm trying with configuration:
>
> log4j.logger.org.glite.security=DEBUG, syslog
>
> log4j.appender.syslog=org.apache.log4j.net.SyslogAppender
> log4j.appender.syslog.layout=org.apache.log4j.PatternLayout
> log4j.appender.syslog.SyslogHost=localhost
> log4j.appender.syslog.Facility=KERN
> log4j.appender.syslog.threshold=DEBUG
>
> # define the pattern of the messages
> log4j.appender.syslog.layout.ConversionPattern=%d{ISO8601} %-5p [%t]
> %c{2} %x - %m%n
>
>
> And the log4 debug log shows:
>
> log4j: Trying to find [log4j.properties] using
> ClassLoader.getSystemResource().
> log4j: Could not find resource: [null].
> log4j: Could not find root logger information. Is this OK?
> log4j: Parsing for [org.glite.security] with value=[DEBUG, syslog].
> log4j: Level token is [DEBUG].
> log4j: Category org.glite.security set to DEBUG
> log4j: Parsing appender named "syslog".
> log4j: Parsing layout options for "syslog".
> log4j: Setting property [conversionPattern] to [%d{ISO8601} %-5p [%t]
> %c{2} %x - %m%n].
> log4j: End of parsing for "syslog".
> log4j: Setting property [facility] to [KERN].
> log4j: Setting property [syslogHost] to [localhost].
> log4j: Setting property [threshold] to [DEBUG].
> log4j: Parsed "syslog" options.
> log4j: Handling log4j.additivity.org.glite.security=[null]
> log4j: Finished configuring.
>
> But nothing ends up in the syslog.
>
> I'm using log4j 1.2.8 on Redhat Enterprise Linux 3 compatible system.
>
> Maybe it is something easy that I'm missing, but I'm trying to avoid
> going into the source code and debugging. So, if somebody has any advice
> or experience, any help would be appreciated.
>
> Thanks,
> Joni
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message