syslogd quesstion

David Tonhofer, m-plify S.A. d.tonhofer at m-plify.com
Sat Nov 12 15:17:48 UTC 2005


I'm pretty sure that there is no way to set up the format without changing syslogd's
code (which is probably not hard to do, BTW).

But if you want to know the 'facility' you can trivially log into different
files depending on the facility. This is want I do. In /etc/syslogconf:


----8<---------------------8<------------------------
#
# We do not need to synch the logs after each line, not even
# the kernel log, which logs a lot of stuff about iptables. Sure,
# we may los stuff if a crash occurs, but we gain speed.
# -> Prepend '-' before the file. See man syslog.conf
#

auth.*          -/var/log/auth_log
authpriv.*      -/var/log/authpriv_log
cron.*          -/var/log/cron_log
daemon.*        -/var/log/daemon_log
kern.*          -/var/log/kern_log
lpr.*           -/var/log/lpr_log
mail.*          -/var/log/mail_log
news.*          -/var/log/news_log
user.*          -/var/log/user_log
uucp.*          -/var/log/uucp_log
ftp.*           -/var/log/ftp_log
syslog.*        -/var/log/syslog_log
local0.*        -/var/log/local0_log
local1.*        -/var/log/local1_log
local2.*        -/var/log/local2_log
local3.*        -/var/log/local3_log
local4.*        -/var/log/local4_log
local5.*        -/var/log/local5_log
local6.*        -/var/log/local6_log
local7.*        -/var/log/local7_log








--On Friday, November 11, 2005 11:07 PM +0530 Nikhil <mnikhil.juno at gmail.com> wrote:

> Hello Friends
>
> I have a syslogd , sucessfully implemented with -r option in a network.
> Currently all the messages that are being logged are in the below format
>
> <date> <machinename> <processname>[<pid>]: <message>
>
> Can I have some format where in the facility/priority is also mentioned so
> that I can see under what facility and priority the messages are being
> logged.
> may be like this:
> <date> <machinename> <facility.priority> <processname>[<pid>]: <message>
>
> Thanks,
> Nikhil




More information about the redhat-list mailing list