[Mailman-Developers] syslog(debug) disable logging in production?

Sylvain Viart sylvain at opensource-expert.com
Thu May 15 17:50:24 CEST 2014


Hi,

I think that syslog() call don't pass through system syslog.
I use Mailman/Logging/Syslog.py

from Mailman.Logging.Syslog import syslog

Is there a way to keep the code without disabling it?
In the mailman/Mailman folder (2.1.15) debug tagged syslog calls are 
commented.

Of course I can write some code:

DEBUG = False

def debug(msg, *args, **kws):
     if DEBUG == 1:
         syslog.write_ex('debug', msg, args, kws)

def process(mlist, msg, msgdata=None):
     global DEBUG
     if hasattr(mlist, 'debug'):
         DEBUG = mlist.debug
[…]

enabling with: config_list -i <(echo mlist.debug=1) listname

I did, in fact… :-)

Did I miss some nice feature?

Regards,
Sylvain.



More information about the Mailman-Developers mailing list