User DEBUG static flag to reduce logging overhead
parent
5f4bacee39
commit
81f88b2473
|
@ -81,6 +81,7 @@ namespace ln.snmp
|
|||
IPEndPoint remoteEndpoint = new IPEndPoint(IPAddress.Any, 0);
|
||||
byte[] datagram = LocalEndpoint.Receive(ref remoteEndpoint);
|
||||
|
||||
if (DEBUG)
|
||||
Logging.Log(LogLevel.DEBUGDETAIL,"SNMPClient: Received: {0}", BitConverter.ToString(datagram));
|
||||
|
||||
ASN1Value asn = new ASN1Value(datagram);
|
||||
|
|
|
@ -26,8 +26,12 @@ namespace ln.snmp.types
|
|||
{
|
||||
snmpCommunity = (OctetString)value.Items[1];
|
||||
|
||||
if (SNMPEngine.DEBUG)
|
||||
Logging.Log(LogLevel.DEBUG, "ASN1Value->PDU: {0}", value.Items[2]);
|
||||
|
||||
snmpPDU = (PDU)value.Items[2];
|
||||
|
||||
if (SNMPEngine.DEBUG)
|
||||
Logging.Log(LogLevel.DEBUG, "PDU: {0}", snmpPDU);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue