mirror of https://github.com/fail2ban/fail2ban
- Removed logging as logger is not started yet here
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@265 a942ae1a-1317-0410-a47c-b1dcaea8d6050.x
parent
d4c9d92ae1
commit
6ff620e7a2
|
@ -25,7 +25,7 @@ __date__ = "$Date$"
|
||||||
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
|
||||||
__license__ = "GPL"
|
__license__ = "GPL"
|
||||||
|
|
||||||
import locale, getopt, logging, sys
|
import locale, getopt, sys
|
||||||
|
|
||||||
# Inserts our own modules path first in the list
|
# Inserts our own modules path first in the list
|
||||||
# fix for bug #343821
|
# fix for bug #343821
|
||||||
|
@ -35,9 +35,6 @@ from version import version
|
||||||
from server.server import Server
|
from server.server import Server
|
||||||
from utils.process import *
|
from utils.process import *
|
||||||
|
|
||||||
# Gets the instance of the logger.
|
|
||||||
logSys = logging.getLogger("fail2ban")
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# \mainpage Fail2Ban
|
# \mainpage Fail2Ban
|
||||||
#
|
#
|
||||||
|
@ -101,19 +98,11 @@ class Fail2banServer:
|
||||||
|
|
||||||
self.getCmdLineOptions(optList)
|
self.getCmdLineOptions(optList)
|
||||||
|
|
||||||
# Add the default logging handler
|
|
||||||
stdout = logging.StreamHandler(sys.stdout)
|
|
||||||
# set a format which is simpler for console use
|
|
||||||
formatter = logging.Formatter('%(name)-16s: %(levelname)-6s %(message)s')
|
|
||||||
# tell the handler to use this format
|
|
||||||
stdout.setFormatter(formatter)
|
|
||||||
logSys.addHandler(stdout)
|
|
||||||
|
|
||||||
if self.conf["background"]:
|
if self.conf["background"]:
|
||||||
retCode = createDaemon()
|
retCode = createDaemon()
|
||||||
#signal.signal(signal.SIGTERM, sigTERMhandler)
|
#signal.signal(signal.SIGTERM, sigTERMhandler)
|
||||||
if not retCode:
|
if not retCode:
|
||||||
logSys.error("Unable to start daemon")
|
print "Unable to start daemon"
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue