improvement: add flag for agentx debugging
agentx/network.py always turned on debugging. It can be useful to have debugging logs of the main application without the agentx debug logs, as they are quite noisy. Now, ./vpp-snmp-agent.py -d will turn on application debugging but NOT agentx debugging. ./vpp-snmp-agent.py -d -dd will turn on both. NOTE: ./vpp-snmp-agent.py -dd will do nothing, because the '-d' flag determines the global logging level.
This commit is contained in:
@ -28,7 +28,11 @@ class Agent(object):
|
||||
self._lastupdate = 0
|
||||
self._update_period = period # Seconds
|
||||
|
||||
self._net = Network(server_address=server_address)
|
||||
try:
|
||||
debug = args.debug_agent
|
||||
except:
|
||||
debug = False
|
||||
self._net = Network(server_address=server_address, debug=debug)
|
||||
|
||||
self._oid_list = []
|
||||
self._args = args
|
||||
|
Reference in New Issue
Block a user