I've been playing with the logOption directive for snmptrapd.conf.
When I specify it this way:
logOption f /var/log/snmptrapd.log
I do get traps logged in this file.
However what level of logging is this? Is it just LOG_NOTICE?
Reading the MAN page:
http://www.net-snmp.org/docs/man/snmpcmd.html
Normal output is (or will be!) logged at a priority level of
LOG_NOTICE
But this text seems to follow after the uppercase F option which is for
specifying priorities.
"For
-LF
and
-LS
the priority specification comes before the file or facility token"
So I've tried this:
logOption F d /var/log/snmptrapd.log
or
logOption F 7 /var/log/snmptrapd.log
Which still logs in /var/log/messages.
logOption Fd /var/log/snmptrapd.log
or
logOption F7 /var/log/snmptrapd.log
or
logOption F 0-7 /var/log/snmptrapd.log
Which still logs in /var/log/messages.
logOption F d/var/log/snmptrapd.log
or
logOption F 7/var/log/snmptrapd.log
Which still logs in /var/log/messages.
logOption F pd /var/log/snmptrapd.log
or
logOption F p7 /var/log/snmptrapd.log
Results in "Starting snmptrapd: invalid priority: p"
logOption d F /var/log/snmptrapd.log
or
logOption 7 F /var/log/snmptrapd.log
Results in "Starting snmptrapd: Unknown logging option passed to -L: d." or
"Starting snmptrapd: Unknown logging option passed to -L: 7."
So I am pretty confused.
My goal is to have debug logging to a separate file.
I also want to be able to specify it in the snmptrapd.conf file.
Thanks in advance for all replies.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users