mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
- Added timestamp to logs
git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@327 a942ae1a-1317-0410-a47c-b1dcaea8d605
This commit is contained in:
parent
438f0e8122
commit
4306c23c0f
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue