Hi David,

Adding to my previous mail.

I want to direct the messages of snmp_log () with priority 0 to 6, to logfile 
/var/lod/snmpd.log, and the messages with priority LOGDEBUg to a file 
/var/log/snmp_debug.log file.
For this, i'm seeting the arguments as below. Is it correct ?
./snmpagent -Lf 0-6 /var/log/snmpd.log -Lf 7 /var/log/snmp_debug.log.

Regards,
Narasi.


--- On Mon, 23/2/09, B V Narasimhulu <[email protected]> wrote:

> From: B V Narasimhulu <[email protected]>
> Subject: Re: Log files
> To: "Dave Shield" <[email protected]>
> Date: Monday, 23 February, 2009, 10:43 AM
> hi,
> From my code, i'm seeing the messges defined with
> DEBUGMSGTL in the logfile.
> 
> i'm running the snmpagent with -Lf /var/log/snmpd.log
> option.
> 
> And I have the code shnap-shot as :
> ----
> char string[10] ="ifTable";
>     debug_register_tokens(string);
> DEBUGMSGTL(("ifTable", "Narsi1: ifNum scalar
> mibobject is registered\n"));
> ----
> 
> But i'm seeing the above messages logged in in any
> place. But i do see the messages of snmp_log() in the
> snmpd.log file.
> Am I missing something over here?
> I have tried the  snmp_set_do_debugging(1) before calling
> DEBUGMSGTL (). But the efforts are in vain.
> 
> Thanks & Regards,
> Narasi
> 
> 
> --- On Thu, 19/2/09, Dave Shield
> <[email protected]> wrote:
> 
> > From: Dave Shield <[email protected]>
> > Subject: Re: Log files
> > To: [email protected]
> > Cc: [email protected]
> > Date: Thursday, 19 February, 2009, 2:05 PM
> > 2009/2/19 B V Narasimhulu <[email protected]>:
> > > Right now the net-snmp log-message from both
> > snmp_log() and DEBUGMSGTL()
> > > are logging to same snmpd.log file.
> > 
> > snmp_log messages are typically logged at priority
> > LOG_WARNING or LOG_ERR
> > DEBUGMSG messages are logged at priority LOG_DEBUG
> > 
> > 
> > > Is there anyway to seperate the messages of
> snmp_log
> > ()
> > > from that of the messages from DEBUGMSGTL() ?
> > 
> > For logging via syslog (-Ls), then see syslog.conf(5).
> > For logging to file (-Lf), then see snmpcmd(1)
> >    In particular, the section LOGGING OPTIONS
> > 
> > 
> > > It would be better if we have seperate log files
> for
> > those messages.
> > 
> > If you want separate files for different priorities,
> you
> > can configure that.
> > It's all in the documentation.
> > 
> > Dave
> 
> 
>       From Chandigarh to Chennai - find friends all over
> India. Go to http://in.promos.yahoo.com/groups/citygroups/


      Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to