mirror of https://github.com/fail2ban/fail2ban
- Removed log4py dependency
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/branches/FAIL2BAN-0_5@162 a942ae1a-1317-0410-a47c-b1dcaea8d6050.5
parent
bed25265d7
commit
4d9c24adbf
|
@ -19,9 +19,9 @@ debug = false
|
||||||
|
|
||||||
# Option: logtargets
|
# Option: logtargets
|
||||||
# Notes.: log targets. Space separated list of logging targets.
|
# Notes.: log targets. Space separated list of logging targets.
|
||||||
# Values: STDOUT STDERR SYSLOG file Default: STDOUT /var/log/fail2ban.log
|
# Values: STDERR SYSLOG file Default: /var/log/fail2ban.log
|
||||||
#
|
#
|
||||||
logtargets = STDOUT /var/log/fail2ban.log
|
logtargets = /var/log/fail2ban.log
|
||||||
|
|
||||||
# Option: pidlock
|
# Option: pidlock
|
||||||
# Notes.: path of the PID lock file (must be able to write to file).
|
# Notes.: path of the PID lock file (must be able to write to file).
|
||||||
|
|
|
@ -24,12 +24,12 @@ __date__ = "$Date$"
|
||||||
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
||||||
__license__ = "GPL"
|
__license__ = "GPL"
|
||||||
|
|
||||||
import log4py
|
import logging
|
||||||
|
|
||||||
from ConfigParser import *
|
from ConfigParser import *
|
||||||
|
|
||||||
# Gets the instance of log4py.
|
# Gets the instance of the logger.
|
||||||
logSys = log4py.Logger().get_instance()
|
logSys = logging.getLogger("fail2ban")
|
||||||
|
|
||||||
class ConfigReader:
|
class ConfigReader:
|
||||||
""" This class allow the handling of the configuration options.
|
""" This class allow the handling of the configuration options.
|
||||||
|
|
|
@ -24,13 +24,13 @@ __date__ = "$Date$"
|
||||||
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
||||||
__license__ = "GPL"
|
__license__ = "GPL"
|
||||||
|
|
||||||
import time, os, log4py, re
|
import time, os, logging, re
|
||||||
|
|
||||||
from utils.process import executeCmd
|
from utils.process import executeCmd
|
||||||
from utils.strings import replaceTag
|
from utils.strings import replaceTag
|
||||||
|
|
||||||
# Gets the instance of log4py.
|
# Gets the instance of the logger.
|
||||||
logSys = log4py.Logger().get_instance()
|
logSys = logging.getLogger("fail2ban")
|
||||||
|
|
||||||
class Firewall:
|
class Firewall:
|
||||||
""" Manages the ban list and executes the command that ban
|
""" Manages the ban list and executes the command that ban
|
||||||
|
|
|
@ -24,12 +24,12 @@ __date__ = "$Date$"
|
||||||
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
||||||
__license__ = "GPL"
|
__license__ = "GPL"
|
||||||
|
|
||||||
import os, sys, time, re, log4py
|
import os, sys, time, re, logging
|
||||||
|
|
||||||
from utils.dns import *
|
from utils.dns import *
|
||||||
|
|
||||||
# Gets the instance of log4py.
|
# Gets the instance of the logger.
|
||||||
logSys = log4py.Logger().get_instance()
|
logSys = logging.getLogger("fail2ban")
|
||||||
|
|
||||||
class LogReader:
|
class LogReader:
|
||||||
""" Reads a log file and reports information about IP that make password
|
""" Reads a log file and reports information about IP that make password
|
||||||
|
|
|
@ -24,12 +24,12 @@ __date__ = "$Date$"
|
||||||
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
||||||
__license__ = "GPL"
|
__license__ = "GPL"
|
||||||
|
|
||||||
import log4py, smtplib
|
import logging, smtplib
|
||||||
|
|
||||||
from utils.strings import replaceTag
|
from utils.strings import replaceTag
|
||||||
|
|
||||||
# Gets the instance of log4py.
|
# Gets the instance of the logger.
|
||||||
logSys = log4py.Logger().get_instance()
|
logSys = logging.getLogger("fail2ban")
|
||||||
|
|
||||||
class Mail:
|
class Mail:
|
||||||
""" Mailer class
|
""" Mailer class
|
||||||
|
|
|
@ -24,10 +24,10 @@ __date__ = "$Date$"
|
||||||
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
||||||
__license__ = "GPL"
|
__license__ = "GPL"
|
||||||
|
|
||||||
import log4py
|
import logging
|
||||||
|
|
||||||
# Gets the instance of log4py.
|
# Gets the instance of the logger.
|
||||||
logSys = log4py.Logger().get_instance()
|
logSys = logging.getLogger("fail2ban")
|
||||||
|
|
||||||
def replaceTag(query, aInfo):
|
def replaceTag(query, aInfo):
|
||||||
""" Replace tags in query
|
""" Replace tags in query
|
||||||
|
|
Loading…
Reference in New Issue