Hi,
I didn't see any way for it to log via the system logging, so I added the
following code to the util.py. I've included a small patch here to add it:
JBB
*** /usr/lib/python2.4/site-packages/DenyHosts/util.py.orig 2011-07-18
11:04:18.000000000 -0400
--- /usr/lib/python2.4/site-packages/DenyHosts/util.py 2011-07-18
11:07:31.000000000 -0400
***************
*** 7,12 ****
--- 7,15 ----
from regex import TIME_SPEC_REGEX
from types import IntType
+ # JBB
+ from logging.handlers import SysLogHandler
+
debug = logging.getLogger("util").debug
def setup_logging(prefs, enable_debug, verbose, daemon):
***************
*** 21,26 ****
--- 24,39 ----
fh.setFormatter(formatter)
# add the handler to the root logger
logging.getLogger().addHandler(fh)
+
+ # JBB
+ logger = logging.getLogger()
+ logger.setLevel(logging.INFO)
+ syslog = SysLogHandler(address='/dev/log')
+ formatter = logging.Formatter('%(name)s: %(levelname)s
%(message)s')
+ syslog.setFormatter(formatter)
+ logger.addHandler(syslog)
+ # JBB
+
if enable_debug:
# if --debug was enabled provide gory activity details
logging.getLogger().setLevel(logging.DEBUG)
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Denyhosts-user mailing list
Denyhosts-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/denyhosts-user