Subject: | Event Sub/Host logging patch for Dispatcher.pm |
Implements the following:
* Added better event debug detail by adding a small _event_info sub that
captures the ref address (as the old one did), plus the name of the
callback and hostname of the destination.
This required:
* A new $event array variable called _HOSTNAME
* The %SUBREFS global, to keep track of names of subroutines to their
ref addresses
While it seems like a lot of code to add in the hostname field
everywhere, it proves to be very useful for multiple host sessions, and
this event field is also required for another patch (which I'll submit
in a bit). Here's what the new debug lines look like:
debug: [582] Net::SNMP::Dispatcher::_event_delete(): deleted
[ARRAY(0xa74e498) ==> &_transport_timeout for 172.29.3.9], defined new
tail [ARRAY(0xa52dc88) ==> &_transport_timeout for 172.29.3.62]
debug: [509] Net::SNMP::Dispatcher::_event_insert(): modified tail
[ARRAY(0xa794710) ==> &_transport_timeout for 127.133.244.234]
debug: [582] Net::SNMP::Dispatcher::_event_delete(): deleted
[ARRAY(0xa7b1278) ==> &_send_pdu for 127.133.244.234], defined new head
[ARRAY(0xa77a580) ==> &_send_pdu for 127.133.244.238]
debug: [509] Net::SNMP::Dispatcher::_event_insert(): modified tail
[ARRAY(0xa790560) ==> &_transport_timeout for 127.133.244.238]
Subject: | EventSubLogging.patch.txt |
Message body is not shown because it is too large.