From 1ef367e77a5d7f38baf2b2f186504ad3228a0230 Mon Sep 17 00:00:00 2001 From: sebres Date: Fri, 14 Oct 2016 20:55:15 +0200 Subject: [PATCH] fixes log format by starting server with `--loglevel=debug` without specifying of verbosity level --- fail2ban/server/server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fail2ban/server/server.py b/fail2ban/server/server.py index e43f56ee..8c001ea3 100644 --- a/fail2ban/server/server.py +++ b/fail2ban/server/server.py @@ -599,6 +599,7 @@ class Server: if logger.getEffectiveLevel() <= logging.DEBUG: # pragma: no cover if self.__verbose is None: self.__verbose = logging.DEBUG - logger.getEffectiveLevel() + 1 + if self.__verbose is not None and self.__verbose > 2: # pragma: no cover fmt = getVerbosityFormat(self.__verbose-1) # tell the handler to use this format hdlr.setFormatter(logging.Formatter(fmt))