1 [syslog-ng][] is a nice, flexible logging system that I use on most of
2 my boxes. There's a good [admin guide][guide], but here are some
3 short notes so I don't forget what I've done locally.
5 I wanted to store my verbose [[git-daemon|gitweb]] logs in their own
6 file, so I added the following to
7 `/etc/syslog-ng/conf.d/git-daemon.conf`:
9 destination git_daemon_file {
10 file("/var/log/git-daemon");
13 filter git_daemon_filter {
14 program("git-daemon");
17 filter git_daemon_drop_filter {
18 #level(notice, debug);
24 filter(git_daemon_filter);
25 filter(git_daemon_drop_filter);
31 filter(git_daemon_filter);
32 destination(git_daemon_file);
36 In `/etc/syslog-ng/syslog-ng.conf`, you'll want to add something like:
40 to source the config files from `/etc/syslog-ng/conf.d` in
41 alphabetical order. You should add the `include` line before any
42 `log` definitions so you can use `final` to in your auxiliary rules.
44 Check that you didn't mess anything up with:
46 $ syslog-ng --syntax-only
48 Restart `syslog-ng` with:
50 # /etc/init.d/syslog-ng reload
53 [syslog-ng]: http://www.balabit.com/network-security/syslog-ng
54 [guide]: http://www.balabit.com/sites/default/files/documents/syslog-ng-v3.0-guide-admin-en.html/bk01-toc.html