Mailinglist Archive: opensuse (3566 mails)
| < Previous | Next > |
[opensuse] Re: Need help creating a syslog -ng config file to perform a Syslog Daemon's Work.
- From: Joachim Schrod <jschrod@xxxxxxx>
- Date: Tue, 24 Apr 2007 15:31:51 +0200
- Message-id: <f0l0s7$m8s$1@xxxxxxxxxxxxx>
Carlos E. R. wrote:
I don't think there's a source modification needed for syslog-ng.
One can specify $LEVEL in a template() clause in a destination section. E.g.
destination d_file {
file("/var/log/messages");
template("$HOUR:$MIN:$SEC $TZ $HOST [$LEVEL] $MSG\n");
template_escape(no);
}
(This is taken straight from the syslog-ng documentation in /usr/share/doc/packages/syslog-ng/syslog-ng.pdf. I would add some more information like $DATE and $FACILITY. ;-)
$LEVEL expands to the name of the level and not to a number, though.
Best,
Joachim
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod Email: jschrod@xxxxxxx
Roedermark, Germany
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The Tuesday 2007-04-24 at 17:58 +1000, Registration Account wrote:
Syslog-ng IS the Linux system log daemon, however it performs function
in much the same way as a Mainframe Daemon works and depending on my
audience I have to be very specific with the reference 'syslog daemon'
due its multiple meanings.
I simply meant that the syslog or syslog-ng daemon in linux doesn't do what you want, ie, record the priority level in the string sent to the file, nor do I know how to write it, short of modifying the source code, which I haven't even inspected to estimate the dificulty of such a simple modification.
I don't think there's a source modification needed for syslog-ng.
One can specify $LEVEL in a template() clause in a destination section. E.g.
destination d_file {
file("/var/log/messages");
template("$HOUR:$MIN:$SEC $TZ $HOST [$LEVEL] $MSG\n");
template_escape(no);
}
(This is taken straight from the syslog-ng documentation in /usr/share/doc/packages/syslog-ng/syslog-ng.pdf. I would add some more information like $DATE and $FACILITY. ;-)
$LEVEL expands to the name of the level and not to a number, though.
Best,
Joachim
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod Email: jschrod@xxxxxxx
Roedermark, Germany
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |