On 12 March 2010 20:47, Robert Story <rst...@freesnmp.com> wrote: > I'd like to see what folks think of changing the behavior of logging when no > log destination is enabled. > > The stderr log is enabled if a message is logged before any log handlers are > enabled:
> The problem is, it is not disabled if a log handler is added. That's definitely not sensible. If logging is explicitly specified, then this is what ought to be used. Anything that's active in advance of this, should be regarded as a temporary stopgap. I haven't had a chance to look properly at the details of your patch, or how it relates to the rest of the code. But I'd certainly support the basic idea. > I've attached a patch to fix this. It simply calls the stderr log hander > directly instead of registering a handler. it keeps the warning, and adds > another when switching away from stderr logging. A couple of immediate thoughts from a brief look at the patch: - I noticed that cert_util.c seems to be printing directly to stderr (immediately above the deleted line). I haven't looked to see the context of this message, but that feels probably wrong. Certainly worth a closer look. - I'd suggest that the message when switching away from the temporary logging should perhaps be at a lower severity (maybe INFO rather than WARNING?). Dave ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders