From e8b4d66c54a49eb14eef42647a0244167152e7f6 Mon Sep 17 00:00:00 2001 From: Cyril Jaquier Date: Mon, 1 Aug 2005 16:41:33 +0000 Subject: [PATCH] - Removed log4py dependency git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@166 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- fail2ban.py | 82 ++++++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/fail2ban.py b/fail2ban.py index 9cab58d3..8eaaeb98 100755 --- a/fail2ban.py +++ b/fail2ban.py @@ -24,7 +24,7 @@ __date__ = "$Date$" __copyright__ = "Copyright (c) 2004 Cyril Jaquier" __license__ = "GPL" -import time, sys, getopt, os, string, signal, log4py +import time, sys, getopt, os, string, signal, logging, logging.handlers from ConfigParser import * from version import version @@ -35,8 +35,8 @@ from utils.mail import Mail from utils.dns import * from utils.process import * -# Gets the instance of log4py. -logSys = log4py.Logger().get_instance() +# Gets the instance of the logger. +logSys = logging.getLogger("fail2ban") # Global variables logFwList = list() @@ -50,13 +50,13 @@ def dispUsage(): print "Fail2Ban v"+version+" reads log file that contains password failure report" print "and bans the corresponding IP addresses using firewall rules." print - print " -b start fail2ban in background" - print " -d start fail2ban in debug mode" + print " -b start in background" + print " -d start in debug mode" print " -c read configuration file FILE" print " -p create PID lock in FILE" print " -h display this help message" print " -i IP(s) to ignore" - print " -k kill a currently running Fail2Ban instance" + print " -k kill a currently running instance" print " -r allow a max of VALUE password failure" print " -t