[SNMP4J] SnmpRequest.java not logging errors

Wilson Burgos WBurgos at Soneticom.com
Fri Aug 1 19:15:32 CEST 2008


Hello,
	I'm using SNMP4j and I can't seem to log SNMP errors when debug
is enabled. I found out the SnmpRequest.java is dumping them to the
console only. Is this the intended behavior not log error messages?

public void requestStatusChanged(RequestStatusEvent event) {
      int newStatus = event.getStatus().getErrorStatus();
      setErrorStatus(newStatus);
      if (logger.isDebugEnabled() &&
          (newStatus != SnmpConstants.SNMP_ERROR_SUCCESS)) {
        new Exception("Error '"+                      
 
PDU.toErrorStatusText(event.getStatus().getErrorStatus())+
                      "' generated at: "+vb).printStackTrace();
      }
}

Thanks,
Wil



More information about the SNMP4J mailing list