2009/2/4 Marcin Niskiewicz <[email protected]>:
> Hello
> Everything that is written by users on console is logged in 3 different
> files (debug , syslog, messages) ...
> I'd like to route all history logs to one file only... i know how to make a
> filter which would write it to specific file but still everything is written
> to other files as well.
>
> is there possibility to configure syslog-ng to log history only to one file
> (for example history.log) and leave others files clean?
>
> best regards
> nichu
>
Hello Marcin!
I imply that you already have done some modifications to your
syslog-ng.conf as logging everything the user type on the console is
not in the standard file that comes with gentoo.
Basically syslog-ng has got sources and destinations. So you have to
take a look at your syslog-ng.conf and find out the name of the
sources and the name of the destination of the history.log file.
Then you can simply add the following line (replace the variables accordingly)
log { source([source that was previously used for debug]);
source([source that was previously used for syslog]); source([source
that was previously used for messages]); destination([destination of
history.log]) };
If all the sources give you the same messages or they are one and the
same source just insert only this one. If your history.log file was
not defined by now you can simply add it as a destination with
destination [name] { file("[path-to-history.log]/history.log");}
Also if there are other log lines that contain the sources and the
destinations that you mentioned you have to remove them completely if
they only contain this one source or just remove the source that
delivers the history.
Then syslog-ng should only log into history.log
Greetings
--
Currently developing a browsergame...
http://www.p-game.de
Trade - Expand - Fight
Follow me at twitter!
http://twitter.com/moortier