- Use /dev/log for SYSLOG output. Thanks to Joerg Sommrey

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@488 a942ae1a-1317-0410-a47c-b1dcaea8d605
0.x
Cyril Jaquier 2006-12-13 23:02:46 +00:00
parent a9b3f190ef
commit 8ca367d609
3 changed files with 7 additions and 3 deletions

View File

@ -10,6 +10,7 @@ Fail2Ban (version 0.7.6) 200?/??/??
ver. 0.7.6 (200?/??/??) - ???
----------
- Added a "sleep 1" in redhat-initd. Thanks to Jim Wight
- Use /dev/log for SYSLOG output. Thanks to Joerg Sommrey
ver. 0.7.5 (2006/12/07) - beta
----------

View File

@ -18,8 +18,9 @@
loglevel = 3
# Option: logtarget
# Notes.: Set the log target. This could be a file, SYSLOG, STDERR.
# Values: STDERR SYSLOG file Default: /var/log/fail2ban.log
# Notes.: Set the log target. This could be a file, SYSLOG, STDERR or STDOUT.
# Only one log target can be specified.
# Values: STDOUT STDERR SYSLOG file Default: /var/log/fail2ban.log
#
logtarget = /var/log/fail2ban.log

View File

@ -306,7 +306,9 @@ class Server:
# Remove previous handler
logging.getLogger("fail2ban").handlers = []
if target == "SYSLOG":
hdlr = logging.handlers.SysLogHandler()
facility = logging.handlers.SysLogHandler.LOG_DAEMON
hdlr = logging.handlers.SysLogHandler("/dev/log",
facility = facility)
elif target == "STDOUT":
hdlr = logging.StreamHandler(sys.stdout)
elif target == "STDERR":