ENH: Added traceback for error log on pyinotify callback when in debug

Thanks to Helmut Grohne for idea on #fail2ban IRC
pull/38/merge
Steven Hiscocks 2014-02-12 22:18:09 +00:00
parent bda9b7d725
commit 1e9910fcb0
1 changed files with 2 additions and 1 deletions

View File

@ -212,4 +212,5 @@ class ProcessPyinotify(pyinotify.ProcessEvent):
try:
self.__FileFilter.callback(event, origin='Default ')
except Exception as e:
logSys.error("Error in FilterPyinotify callback: %s", e)
logSys.error("Error in FilterPyinotify callback: %s",
e, exc_info=logSys.getEffectiveLevel() <= logging.DEBUG)