Gitweb allows browsing repositories via HTTP, but if you will be
pulling from your repositories using the `git://` protocol, you'll
also want to run `git-daemon`. On Gentoo, this is really easy, just
-edit `/etc/conf.d/git-daemon` as you see fit. I added
+edit `/etc/conf.d/git-daemon` as you see fit. I added `--verbose`,
`--base-path=/var/git` and `--export-all` to `GITDAEMON_OPTS`. Start
the daemon with
# rc-update add git-daemon default
+If you're logging to syslog and running syslog-ng, you can configure
+the log location using the usual syslog tricks. See my [[syslog-ng]]
+for details.
+
[summary]: http://www.philsergi.com/2008/04/gitweb-apache-gentoo.html
[[!tag tags/git]]
--- /dev/null
+[syslog-ng][] is a nice, flexible logging system that I use on most of
+my boxes. There's a good [admin guide][guide], but here are some
+short notes so I don't forget what I've done locally.
+
+I wanted to store my verbose [[git-daemon|gitweb]] logs in their own
+file, so I added the following to
+`/etc/syslog-ng/conf.d/git-daemon.conf`:
+
+ destination git_daemon_file {
+ file("/var/log/git-daemon");
+ };
+
+ filter git_daemon_filter {
+ program("git-daemon");
+ };
+
+ filter git_daemon_drop_filter {
+ #level(notice, debug);
+ level(debug);
+ };
+
+ log {
+ source(src);
+ filter(git_daemon_filter);
+ filter(git_daemon_drop_filter);
+ flags(final);
+ };
+
+ log {
+ source(src);
+ filter(git_daemon_filter);
+ destination(git_daemon_file);
+ flags(final);
+ };
+
+In `/etc/syslog-ng/syslog-ng.conf`, you'll want to add something like:
+
+ include "conf.d";
+
+to source the config files from `/etc/syslog-ng/conf.d` in
+alphabetical order. You should add the `include` line before any
+`log` definitions so you can use `final` to in your auxiliary rules.
+
+Check that you didn't mess anything up with:
+
+ $ syslog-ng --syntax-only
+
+Restart `syslog-ng` with:
+
+ # /etc/init.d/syslog-ng reload
+
+
+[syslog-ng]: http://www.balabit.com/network-security/syslog-ng
+[guide]: http://www.balabit.com/sites/default/files/documents/syslog-ng-v3.0-guide-admin-en.html/bk01-toc.html
+
+[[!tag tags/tools]]
+[[!tag tags/linux]]