[syslog-ng] logging facility in log file

Geller, Sandor (IT) Sandor.Geller at morganstanley.com
Mon Jun 30 12:11:48 CEST 2008


Hi,

> I am using syslog-ng to do remote logging for facility of
> "local6" and priority of "warn", the log server is Linux
> system(SLES10 SP1), it works well with the message content,
> only one problem is the keyword of "local6" is not logged in
> the log file, please see the details below:
> on c890mgrs4(Linux)
> Jun 25 20:53:34 c890f12ec07 root: sunjing test 1
> Jun 25 20:53:38 c890f12ec07 root: sunjing test 2
>
> I did the same thing on AIX log server, while it could log
> the keyword of "local6" in log file:
> on c890mgrs3(AIX)
> Jun 25 20:53:34 c890f12ec07 local6:warn|warning c890f12ec07
> root: sunjing test 1
> Jun 25 20:53:38 c890f12ec07 local6:warn|warning c890f12ec07
> root: sunjing test 2
>
> So I am guessing that I did not enable this facility logging
> in syslog-ng, maybe syslog-ng has a certain configuration
> that could let the "facility" logged in message file, am I
> right? or could you point me to the correct method? I need
> this "facility" information to develop my applications.

There are macros which you could use (FACILITY, PRIORITY).
Simply add a template containing these to the destination
section(s). You should check the reference documentation
about templates and macros.

Regards,

Sandor
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.


More information about the syslog-ng mailing list