Permalink
Browse files

Set level and add formatter

  • Loading branch information...
1 parent 1df78a9 commit 10f72e59af25fefbeafcc147c44814cb3ff7e598 @Roguelazer committed May 5, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 fakemtpd/server.py
View
@@ -242,7 +242,8 @@ def _setup_logging(self):
syslog_handler = logging.handlers.SysLogHandler(self.config.syslog_connection, facility=facility)
else:
syslog_handler = logging.handlers.SysLogHandler(self.config.syslog_connection, facility=facility)
- print >>sys.stderr, "Adding %s" % syslog_handler
+ syslog_handler.setLevel(self._log_level)
+ syslog_handler.addFormatter(logging.Formatter(self._log_format))
logging.getLogger().addHandler(syslog_handler)
else:
logging.basicConfig(stream=sys.stderr, format=self._log_fmt, level=self._log_level)

0 comments on commit 10f72e5

Please sign in to comment.