[Mailman-Developers] syslog(debug) disable logging in production?
Mark Sapiro
mark at msapiro.net
Fri May 16 02:35:06 CEST 2014
On 05/15/2014 08:50 AM, Sylvain Viart wrote:
> 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?
No, but you could just leave your syslog('debug', ...) calls intact and do
ln -s /dev/null /path/to/mailman/logs/debug
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Developers
mailing list