Re: how to disable log to the screen with API

黄心怡 <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAE2OXCYs0=b33hf_eRbfmCuwUQFY1NXFq2eGPNgAQtUhYmNs=g@mail.gmail.com>
Thank you very much.The problem is solved.

Sorry  I send the mail to you privately, I didn't mean to.

And,  this problem is fixed by the following steps, I record these in case
other guys need reference.

    //disable log first
    snmp_disable_log();
    netsnmp_log_handler *logh_head = get_logh_head();
    while(NULL != logh_head)
        netsnmp_remove_loghandler( logh_head );
    netsnmp_log_handler *logh =
netsnmp_register_loghandler(NETSNMP_LOGHANDLER_NONE, LOG_DEBUG);
    if (logh){
        logh->pri_max = LOG_EMERG;
    }

   //then,do what you want
   init_snmp("snmpapp");

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
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.