Thanks it worked fine setting the log handler *before* activating the debug code.
Thanks ----- Original Message ----- From: Dave Shield <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: [email protected] Sent: Sat, 14 Jun 2008 18:31:28 +0530 (IST) Subject: Re: Logging of subagent to different file 2008/6/14 <[EMAIL PROTECTED]>: > The problem is that if i don't add following lines in code the logs for > DEBUGMSG("Started") > and DEBUGMSGTL("snmpV3Agent","Started") do not come but my logfile is created > > debug_register_tokens("snmpV3Agent,currentAlarmTable"); > snmp_set_do_debugging(1); > > but on adding these above lines log start coming in my logfile but also come > on console > > code piece: > ------------------------------------------------------------- > debug_register_tokens("snmpV3Agent,currentAlarmTable"); > snmp_set_do_debugging(1); > > /* Logging to a different file */ > logh = netsnmp_register_loghandler(NETSNMP_LOGHANDLER_FILE, priority); <etc> Try setting up the log handler *before* activating the debug code. If you look at the output currently produced, my guess is that it probably starts with: No log handling enabled - turning on stderr logging Dave ------------------------------------------------------------------------- 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 _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
