Re: Logging of subagent to different file

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.devel,gmane.network.net-snmp.user
Message-ID <[email protected]>
2008/6/10  <[email protected]>:
> Could it be possible for creating a different log file for subagent
> and manage the log level and type of log messages to be logged.

If your subagent understands the standard command-line arguments,
then you can use the -Lf option to specify the appropriate log file to use.

Otherwise, you could either code your subagent to use the
snmp_log_options() routine  (to handle command-line options),
or extract the relevant code from this routine.

You basically need to set up a NETSNMP_LOGHANDLER_FILE
style log handler, and specify the name of the file to log to
(logh->token)

Dave

PS:  Can you please post requests to *one* of the mailing lists,
        not both.  Thanks

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.