mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
ENH: reintroducing levelnameinto syslog msgs, time stamp and indentation in non-syslog msgs
any indentation from syslog msgs wsa removed -- no need
This commit is contained in:
parent
d34d8db3d2
commit
a6f085786c
1 changed files with 2 additions and 2 deletions
|
|
@ -347,10 +347,10 @@ class Server:
|
|||
try:
|
||||
self.__loggingLock.acquire()
|
||||
# set a format which is simpler for console use
|
||||
formatter = logging.Formatter("%(name)s[%(process)d]: %(levelname)-7s %(message)s")
|
||||
formatter = logging.Formatter("%(asctime)s %(name)-16s[%(process)d]: %(levelname)-7s %(message)s")
|
||||
if target == "SYSLOG":
|
||||
# Syslog daemons already add date to the message.
|
||||
formatter = logging.Formatter("%(name)s[%(process)d]: %(message)s")
|
||||
formatter = logging.Formatter("%(name)s[%(process)d]: %(levelname)s %(message)s")
|
||||
facility = logging.handlers.SysLogHandler.LOG_DAEMON
|
||||
hdlr = logging.handlers.SysLogHandler("/dev/log", facility=facility)
|
||||
elif target == "STDOUT":
|
||||
|
|
|
|||
Loading…
Reference in a new issue