Gentoo Archives: gentoo-user

From: Yannick Mortier <mvmortier@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] syslog-ng +bash history
Date: Wed, 04 Feb 2009 15:42:51
Message-Id: 71ca7fa0902040742o48c1e0cy49d42dc6a92746bc@mail.gmail.com
In Reply to: [gentoo-user] syslog-ng +bash history by Marcin Niskiewicz
1 2009/2/4 Marcin Niskiewicz <mniskiewicz@×××××.com>:
2 > Hello
3 > Everything that is written by users on console is logged in 3 different
4 > files (debug , syslog, messages) ...
5 > I'd like to route all history logs to one file only... i know how to make a
6 > filter which would write it to specific file but still everything is written
7 > to other files as well.
8 >
9 > is there possibility to configure syslog-ng to log history only to one file
10 > (for example history.log) and leave others files clean?
11 >
12 > best regards
13 > nichu
14 >
15
16
17 Hello Marcin!
18 I imply that you already have done some modifications to your
19 syslog-ng.conf as logging everything the user type on the console is
20 not in the standard file that comes with gentoo.
21
22 Basically syslog-ng has got sources and destinations. So you have to
23 take a look at your syslog-ng.conf and find out the name of the
24 sources and the name of the destination of the history.log file.
25
26 Then you can simply add the following line (replace the variables accordingly)
27
28 log { source([source that was previously used for debug]);
29 source([source that was previously used for syslog]); source([source
30 that was previously used for messages]); destination([destination of
31 history.log]) };
32
33 If all the sources give you the same messages or they are one and the
34 same source just insert only this one. If your history.log file was
35 not defined by now you can simply add it as a destination with
36
37 destination [name] { file("[path-to-history.log]/history.log");}
38
39 Also if there are other log lines that contain the sources and the
40 destinations that you mentioned you have to remove them completely if
41 they only contain this one source or just remove the source that
42 delivers the history.
43
44 Then syslog-ng should only log into history.log
45
46 Greetings
47
48
49 --
50 Currently developing a browsergame...
51 http://www.p-game.de
52 Trade - Expand - Fight
53
54 Follow me at twitter!
55 http://twitter.com/moortier

Replies

Subject Author
Re: [gentoo-user] syslog-ng +bash history Marcin Niskiewicz <mniskiewicz@×××××.com>