From: rettenbe Date: Mon, 21 Jul 2008 09:37:09 +0000 (+0000) Subject: * closes #487 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5949d7a59a19be9e05514a386e3204b162efb3e1;p=gosa.git * closes #487 * correct DEBUG/ERROR status in log line git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11725 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client index 120be0734..8944c1a0a 100755 --- a/gosa-si/gosa-si-client +++ b/gosa-si/gosa-si-client @@ -1102,13 +1102,12 @@ daemon_log("INFO: gosa-si-client mac address detected: $client_mac_address", 1); # import events my ($error, $result, $tmp_hash) = &import_events($event_dir); $event_hash = $tmp_hash; -if ($error == 0) { - foreach my $log_line (@$result) { - daemon_log("DEBUG: $log_line", 7); - } -} else { - foreach my $log_line (@$result) { - daemon_log("ERROR: $log_line", 1); + +foreach my $log_line (@$result) { + if ($log_line =~ / succeed: /) { + &main::daemon_log("0 DEBUG: $log_line", 7); + } else { + &main::daemon_log("0 ERROR: $log_line", 1); } } diff --git a/gosa-si/modules/ClientPackages.pm b/gosa-si/modules/ClientPackages.pm index dfd104a05..b7d87a42d 100644 --- a/gosa-si/modules/ClientPackages.pm +++ b/gosa-si/modules/ClientPackages.pm @@ -60,15 +60,13 @@ $main::server_mac_address= &get_mac($network_interface); # import local events my ($error, $result, $event_hash) = &import_events($event_dir); -if ($error == 0) { - foreach my $log_line (@$result) { + +foreach my $log_line (@$result) { + if ($log_line =~ / succeed: /) { &main::daemon_log("0 DEBUG: ClientPackages - $log_line", 7); - } -} else { - foreach my $log_line (@$result) { + } else { &main::daemon_log("0 ERROR: ClientPackages - $log_line", 1); } - } # Unit tag can be defined in config diff --git a/gosa-si/modules/GosaPackages.pm b/gosa-si/modules/GosaPackages.pm index 5f6b4657b..5791a318e 100644 --- a/gosa-si/modules/GosaPackages.pm +++ b/gosa-si/modules/GosaPackages.pm @@ -57,12 +57,11 @@ my $xml = new XML::Simple(); # import local events my ($error, $result, $event_hash) = &import_events($event_dir); -if ($error == 0) { - foreach my $log_line (@$result) { + +foreach my $log_line (@$result) { + if ($log_line =~ / succeed: /) { &main::daemon_log("0 DEBUG: GosaPackages - $log_line", 7); - } -} else { - foreach my $log_line (@$result) { + } else { &main::daemon_log("0 ERROR: GosaPackages - $log_line", 1); } } diff --git a/gosa-si/modules/ServerPackages.pm b/gosa-si/modules/ServerPackages.pm index b33a49879..ca0a1c8b7 100644 --- a/gosa-si/modules/ServerPackages.pm +++ b/gosa-si/modules/ServerPackages.pm @@ -21,12 +21,10 @@ END {} # import local events my ($error, $result, $event_hash) = &import_events($event_dir); -if ($error == 0) { - foreach my $log_line (@$result) { +foreach my $log_line (@$result) { + if ($log_line =~ / succeed: /) { &main::daemon_log("0 DEBUG: ServerPackages - $log_line", 7); - } -} else { - foreach my $log_line (@$result) { + } else { &main::daemon_log("0 ERROR: ServerPackages - $log_line", 1); } }