- Added timestamp to logs

git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@327 a942ae1a-1317-0410-a47c-b1dcaea8d605
0.x
Cyril Jaquier 2006-09-06 17:39:57 +00:00
parent 438f0e8122
commit 4306c23c0f
1 changed files with 1 additions and 1 deletions

View File

@ -291,7 +291,7 @@ class Server:
logSys.error("Unable to log to " + target)
return False
# set a format which is simpler for console use
formatter = logging.Formatter('%(name)-16s: %(levelname)-6s %(message)s')
formatter = logging.Formatter("%(asctime)s %(name)-16s: %(levelname)-6s %(message)s")
# tell the handler to use this format
hdlr.setFormatter(formatter)
logging.getLogger("fail2ban").addHandler(hdlr)