From: <buc...@us...> - 2014-11-27 12:54:01
|
Revision: 245 http://sourceforge.net/p/devmon/code/245 Author: buchanmilne Date: 2014-11-27 12:53:57 +0000 (Thu, 27 Nov 2014) Log Message: ----------- Improve logging: - Move some logging only required for dev purposes to debug level 5 - Include the device name in "Missing repeater data" logs Modified Paths: -------------- trunk/modules/dm_config.pm trunk/modules/dm_tests.pm Modified: trunk/modules/dm_config.pm =================================================================== --- trunk/modules/dm_config.pm 2013-09-02 12:30:23 UTC (rev 244) +++ trunk/modules/dm_config.pm 2014-11-27 12:53:57 UTC (rev 245) @@ -1323,7 +1323,7 @@ my ($ip, $host, $bbopts) = ($1, $2, $3); # Skip if the NET tag does not match this site - do_log("Checking if $bbopts matches NET:" . $g{'bblocation'} . ".",4) if $g{'debug'}; + do_log("Checking if $bbopts matches NET:" . $g{'bblocation'} . ".",5) if $g{'debug'}; if ($g{'bblocation'} ne '') { if ($bbopts !~ / NET:$g{'bblocation'}/) { do_log("The NET for $host is not $g{'bblocation'}. Skipping.",3); @@ -1508,7 +1508,7 @@ # Skip if this host doesnt match the regex if ($sysdesc !~ /$regex/) { - do_log("$host did not match $vendor : $model : $regex", 0) + do_log("$host did not match $vendor : $model : $regex", 4) if $g{'debug'}; next OLDMODEL; } Modified: trunk/modules/dm_tests.pm =================================================================== --- trunk/modules/dm_tests.pm 2013-09-02 12:30:23 UTC (rev 244) +++ trunk/modules/dm_tests.pm 2014-11-27 12:53:57 UTC (rev 245) @@ -1235,7 +1235,7 @@ } else {$then_oid_val = $oids->{$then_oid}{'val'}} if(!defined $then_oid_val) { - do_log("Missing repeater data for trans_switch on $oid", 0); + do_log("Missing repeater data for trans_switch on $oid on $device", 0); $then_oid_val = 'Undefined'; } $then =~ s/\{$then_oid\}/$then_oid_val/g; @@ -1285,7 +1285,7 @@ } else {$then_oid_val = $oids->{$then_oid}{'val'}} if(!defined $then_oid_val) { - do_log("Missing repeater data for trans_switch on $oid", 0); + do_log("Missing repeater data for trans_switch on $oid on $device", 0); $then_oid_val = 'Undefined'; } $then =~ s/\{$then_oid\}/$then_oid_val/g; @@ -1358,7 +1358,7 @@ } else {$then_oid_val = $oid_h->{'val'}} if(!defined $then_oid_val) { - do_log("Missing repeater data for trans_tswitch on $oid", 0); + do_log("Missing repeater data for trans_tswitch on $oid on $device", 0); $then_oid_val = 'Undefined'; if(!defined $oid_h->{'color'}{$leaf}) { $oid_h->{'color'}{$leaf} = $oids->{$then_oid}{'color'}; @@ -1418,7 +1418,7 @@ } if(!defined $then_oid_val) { - do_log("Missing repeater data for trans_tswitch on $oid", 0); + do_log("Missing repeater data for trans_tswitch on $oid on $device", 0); $then_oid_val = 'Undefined'; } $then =~ s/\{$then_oid\}/$then_oid_val/g; @@ -1905,7 +1905,7 @@ # Make sure we have leaf data for our primary oid if(!defined $oids->{$pri}{'val'}) { - do_log("Missing repeater data for $pri for $test msg", 0); + do_log("Missing repeater data for $pri for $test msg on $device", 0); $msg .= "&clear Missing repeater data for primary OID $pri\n"; $worst_color = 'clear'; next; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |