mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
BF: Fix getLogger for single level log level names
This commit is contained in:
parent
9764c78415
commit
664f1db0ba
1 changed files with 3 additions and 1 deletions
|
|
@ -111,7 +111,9 @@ class FormatterWithTraceBack(logging.Formatter):
|
|||
def getLogger(name):
|
||||
"""Get logging.Logger instance with Fail2Ban logger name convention
|
||||
"""
|
||||
return logging.getLogger("fail2ban.%s" % name.rpartition(".")[-1])
|
||||
if "." in name:
|
||||
name = "fail2ban.%s" % name.rpartition(".")[-1]
|
||||
return logging.getLogger(name)
|
||||
|
||||
def excepthook(exctype, value, traceback):
|
||||
"""Except hook used to log unhandled exceptions to Fail2Ban log
|
||||
|
|
|
|||
Loading…
Reference in a new issue