On Tue, 21 Jun 2005 15:31:04 +0100 Dave wrote: DS> > DS> if (!get_logh_head()) DS> > DS> snmp_enable_filelog( LOGFILE ); DS> > DS> > Ok. The only change I'd make there is to actually scan the log handlers DS> > to make sure one was enabled.. DS> [...] DS> Although the logging handlers would presumably need to be explicitly DS> set up (and explicitly disabled) - disabled handlers wouldn't be DS> created by default. If the administrator has deliberately turned DS> off all logging, shouldn't it be left like that?
True enough. So I just set a flag when any command line argument related to logging is hit, and if the flag isn't set, turn on the default. DS> What happens if the logging settings are changed dynamically (e.g via DS> the nsLoggingTable), and then the agent is restarted? By restarted, I assume you mean re-configured (eg HUP)? DS> Does it revert to the previous logging configuration (i.e. as at agent DS> start time), or does it use the settings immediately prior to agent DS> restart? Good question. On reconfig, snmp_logging_restart() will close and reopen any file based handlers. If restart != reconfig, then I have no earthly idea. I'd have to look at what restart does... DS> > Now, what about older releases? I think it should go in them too, to fix DS> > the problems I initially described. DS> DS> 5.2.x - yes, almost certainly DS> 5.0.x - no, definitely not DS> (but that doesn't include the handler-based logging mechanism anyway) Agreed (5.0.x is dead anyway, right? Didn't we declare 5.0.10 the last of the line?) DS> 5.1.x - Ummm.... not sure. DS> My gut reaction is to say not - it feels too significant a changes. DS> But it's a sensible change, and probably qualifies as a bug fix. DS> I'm happy to leave that decision to the 5.1.x line manager :-) Well, not honoring the enabled flag (5.1.2 status) definitely seems like a bug, and honoring it causes the issues described in my initial mail. So I see it as a hidden bug, revealed by another fix. -- Robert Story; NET-SNMP Junkie Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp> Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders> You are lost in a twisty maze of little standards, all different. ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
