mirror of https://github.com/fail2ban/fail2ban
- Added timestamp to logs
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@327 a942ae1a-1317-0410-a47c-b1dcaea8d6050.x
parent
438f0e8122
commit
4306c23c0f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue