Skip to content

Commit

Permalink
Remove grotesque debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mstovenour committed Dec 18, 2013
1 parent c271c0a commit 8ff4022
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion lib/Generic_Item.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,6 @@ sub debuglevel
$debug_level = 1 unless $debug_level;
my $objname;
$objname = lc $object->get_object_name if defined $object;
::print_log("[Generic_Item] debuglevel: Processing debug for object $objname ... " . $main::Debug{$objname}) if $main::Debug{$debug_group} >= 5;
return 1 if $main::Debug{$debug_group} >= $debug_level;
return 1 if defined $objname && $main::Debug{$objname} >= $debug_level;
return 0;
Expand Down
9 changes: 4 additions & 5 deletions lib/Insteon/AllLinkDatabase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ sub delete_orphan_links
%delete_req = (%delete_req, deviceid => $deviceid, group => $group,
is_controller => $is_controller, data3 => $data3);

::print_log("[Insteon::AllLinkDatabase] DEBUG-omg: Evaluating $selfname($self_id) link: is_controller=$is_controller deviceid=$deviceid group=$group data3=$data3 interface_id=$interface_id") if $main::Debug{insteon} >= 5;
# Is the linked device defined in MH?
if (! ref $linked_device) {
$delete_req{cause} = "no device with deviceid: $deviceid could be found";
Expand Down Expand Up @@ -546,7 +545,6 @@ sub delete_orphan_links
#Ask self what we should have in data3
#For rspndr, D3 = rspndr group; For ctrlr, D3 = ctrlr group
my $link_data3 = $$self{device}->link_data3(($is_controller ? $group : $member->group), $is_controller);
::print_log("[Insteon::AllLinkDatabase] DEBUG-omg: member: ".$member->get_object_name."(".$member->device_id.") data3: $data3; link data3: $link_data3") if $main::Debug{insteon} >= 5;
if ($data3 eq $link_data3){
$link_defined = 1;
$recip_data3 = ($is_controller) ? $member->group : $group;
Expand Down Expand Up @@ -612,7 +610,6 @@ sub delete_orphan_links

# Does a reciprocal link exist?
if (! $linked_device->has_link($$self{device},$group,($is_controller) ? 0 : 1, lc $recip_data3)) {
::print_log("[Insteon::AllLinkDatabase] DEBUG-omg: No reciprocal link: \$recip_data3 = $recip_data3") if $main::Debug{insteon} >= 5;
$delete_req{cause} = "no reciprocal link was found on " . $linked_device->get_object_name;
push @{$$self{delete_queue}}, \%delete_req;
}
Expand Down Expand Up @@ -907,7 +904,8 @@ sub add_link
{
&::print_log("[Insteon::AllLinkDatabase] DEBUG2: adding link record to " . $$self{device}->get_object_name
. " light level controlled by " . $insteon_object->get_object_name
. " and group: $group with on level: $on_level, ramp rate: $ramp_rate, local load(data3): $data3")
. " and group: $group with on level: $on_level,"
. " ramp rate: $ramp_rate, local load(data3): $data3")
if $self->{device}->debuglevel(2, 'insteon');
my ($data1, $data2);
if($link_parms{is_controller}) {
Expand Down Expand Up @@ -973,7 +971,8 @@ sub update_link

&::print_log("[Insteon::AllLinkDatabase] DEBUG2: updating " . $$self{device}->get_object_name
. " light level controlled by " . $insteon_object->get_object_name
. " and group: $group with on level: $on_level, ramp rate: $ramp_rate, local load(data3): $data3")
. " and group: $group with on level: $on_level,"
. " ramp rate: $ramp_rate, local load(data3): $data3")
if $self->{device}->debuglevel(2, 'insteon');

$$self{_success_callback} = ($link_parms{callback}) ? $link_parms{callback} : undef;
Expand Down
1 change: 0 additions & 1 deletion lib/Insteon/Lighting.pm
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,6 @@ sub link_data3
#information is gathered about Relay type devices.
if ($self->can('engine_version') && $self->engine_version eq 'I2CS') {
$link_data3 = '01';
::print_log("[Insteon::SwitchLincRelay] Overriding link_data3 to 01 for group 01");
}
}

Expand Down

0 comments on commit 8ff4022

Please sign in to comment.