From 1e9910fcb0e2eae1004b149d10fdc5876c25c48f Mon Sep 17 00:00:00 2001 From: Steven Hiscocks Date: Wed, 12 Feb 2014 22:18:09 +0000 Subject: [PATCH] ENH: Added traceback for error log on pyinotify callback when in debug Thanks to Helmut Grohne for idea on #fail2ban IRC --- server/filterpyinotify.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/filterpyinotify.py b/server/filterpyinotify.py index 530b712d..42243552 100644 --- a/server/filterpyinotify.py +++ b/server/filterpyinotify.py @@ -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)