mirror of https://github.com/fail2ban/fail2ban
amend resp. restore of change from 59c35bc44a
(gh-129):
- logging of "Log rotation detected" with new MSG level - introduces new log-level MSG (as INFO-2, 18)pull/1736/head
parent
52c1950371
commit
e8596cfce7
|
@ -34,7 +34,9 @@ Below derived from:
|
|||
https://mail.python.org/pipermail/tutor/2007-August/056243.html
|
||||
"""
|
||||
|
||||
logging.MSG = logging.INFO - 2
|
||||
logging.NOTICE = logging.INFO + 5
|
||||
logging.addLevelName(logging.MSG, 'MSG')
|
||||
logging.addLevelName(logging.NOTICE, 'NOTICE')
|
||||
|
||||
|
||||
|
|
|
@ -820,7 +820,7 @@ class FileContainer:
|
|||
## sys.stdout.flush()
|
||||
# Compare hash and inode
|
||||
if self.__hash != myHash or self.__ino != stats.st_ino:
|
||||
logSys.info("Log rotation detected for %s" % self.__filename)
|
||||
logSys.log(logging.MSG, "Log rotation detected for %s" % self.__filename)
|
||||
self.__hash = myHash
|
||||
self.__ino = stats.st_ino
|
||||
self.__pos = 0
|
||||
|
|
Loading…
Reference in New Issue