DS> Just to check - are you talking about logging from the SNMP agent
DS> specifically, or more generally about the underlying library log
DS> routines.
DS>
DS> > By default, a standard logfile has always been opened
DS> > (/var/log/snmpd.log).
DS>
DS> That sounds like the agent's logging in particular - yes?
Yes...
DS> One thing to bear in mind. When I submitted the modular logging
DS> code, this included the minimal changes needed for the agent to
DS> make use of it. I didn't rip out all of the agent-specific
DS> logging code and replace it with fully new-style handling.
DS>
DS> This was probably always needed, but I wanted to have some
DS> discussion and feedback about the new mechanism first. You
DS> know what a cautious coder I can be at times!
Hmmm.. I thought just the internals of logging changed.. what is this new-style
handling you speak of?
DS> > -l /dev/null .... now spits out a warning to use '-Lf
DS> > <file>' instead. Those who followed that advice were surprised
DS> > to find out that the default log file was still created,
DS> > The new log handler allows multiple log destinations, so
DS> > setting one does not overwrite another.
DS>
DS> That feels like the underlying source of the problem, IMO.
DS> The first '-L' option (of whatever style) should probably
DS> replace the default logging setting. Any subsequent '-L'
DS> options should augment this.
DS>
DS> Or looked at another way - the agent (or any other application)
DS> should probably check whether any logging has been set up,
DS> and only set up the default mechanism if there's nothing
DS> else in place:
DS>
DS> if (!get_logh_head())
DS> snmp_enable_filelog( LOGFILE );
Ok. The only change I'd make there is to actually scan the log handlers to make
sure one was enabled..
DS> > 2) only set up the default location if no other logging option was set.
DS>
DS> Yup. I agree with that (see above).
Good, That was my choice too. I'll get that in main straightaway. Now, what
about older releases? I think it should go in them too, to fix the problems I
initially described.
--
NOTE: messages sent directly to me, instead of the lists, will be deleted
unless they are requests for paid consulting services.
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