On Mon, 2005-11-21 at 13:57 -0500, Robert Story wrote:
> However, there are some quirks to
> snmptrapd's log handling. So I'm opening a dialog.
Sounds good.
Let's get the agreement out of the way first :-)
> 1) it has distinct knowledge coded in for syslog logging and file/print
> handling. Even to the point of logging differently formatted startup messages!
I would agree that there's no real point in having different startup
messages. That's probably a hangover from the original code history.
When I implemented the handler-based mechanism, I was trying to keep
the changes to a minimum, so retained the existing formatting as
much as possible.
A major-number release seems the obvious time to tidy this up.
I'm not really bothered about the exact format of this startup message.
> 3) Unfortunately, snmptrapd has no documented
> behaviour for opening log files at startup.
> Do we want to add an option to allow appending to log files?
Yes. That's clearly a useful distinction to be able to make.
> 4) For future consideration, it would be nice to add some processing
> to -L to allow per-log options to be set.
Why not tie this into 3) ?
If we're tackling half of the problem now anyway, why not tackle
it in full?
> eg -Lt [truncate|append], which would allow something like:
>
> -Lf file.trunc -Lt append -Lf file.app
>
> where file.trun would be truncated when created (the default), and file.app
> would be appended.
I like the basic idea, though not the proposed syntax.
It feels a little confusing.
Alternative proposal:
-Lf file.truncate
-La file.append
(with the usual interpretation for -LF/-LA)
That would have the advantage of making this behaviour available to
*all* snmplib-based applications, in a consistent manner.
I'll come back to issue 2) (and the remaining bit of 1)) shortly.
Dave
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders