From dean@arctic.org Tue Aug 16 23:03:30 2005 Date: Tue, 16 Aug 2005 23:03:30 -0700 (PDT) From: dean gaudet To: submit@bugs.debian.org Subject: use /dev/log for syslog logging Package: fail2ban Version: 0.5.2-1 if you ask fail2ban to use SYSLOG for logging it'll try to log to localhost:514 ... which isn't typically enabled on a debian system. the below patch fixes this to use /dev/log, and allows the user to optionally change the syslog-facility in the config file (i prefer to see the log messages in facility 4 alongside my ssh messages). -dean --- fail2ban.py.orig 2005-08-16 22:43:53.000000000 -0700 +++ fail2ban.py 2005-08-16 22:58:50.000000000 -0700 @@ -175,6 +175,7 @@ # Options optionValues = (["bool", "background", False], ["str", "logtargets", "/var/log/fail2ban.log"], + ["int", "syslog-facility", 1], ["bool", "debug", False], ["str", "pidlock", "/var/run/fail2ban.pid"], ["int", "maxretry", 3], @@ -241,7 +242,7 @@ if target == "STDERR": hdlr = logging.StreamHandler(sys.stderr) elif target == "SYSLOG": - hdlr = logging.handlers.SysLogHandler() + hdlr = logging.handlers.SysLogHandler("/dev/log", conf["syslog-facility"]) else: # Target should be a file try: