index 714b9768e948bdf38681b6d9ecc730a42d9c1d24..c5b9976e292b20dca079e31992ec69f5b0cf273d 100644 (file)
package logHandling;
+
+
+use strict;
+use warnings;
+
use Exporter;
-@ISA = qw(Exporter);
+use GOSA::GosaSupportDaemon;
+use Data::Dumper;
+use File::Spec;
+use MIME::Base64;
+
+our @ISA = qw(Exporter);
+
my @events = (
"get_events",
"show_log_by_mac",
"get_recent_log_by_mac",
"delete_log_by_date_and_mac",
);
-@EXPORT = @events;
-use strict;
-use warnings;
-use GOSA::GosaSupportDaemon;
-use Data::Dumper;
-use File::Spec;
-use MIME::Base64;
+our @EXPORT = @events;
BEGIN {}
if (not -f $act_log_file) {
my $error_string = "client fai log file '$act_log_file' do not exist or could not be read";
&main::daemon_log("$session_id ERROR: $error_string", 1);
+ &main::daemon_log("$session_id ERROR: mac='$mac', date='$date', log_file='$log_file'", 1);
+ &main::daemon_log("$session_id ERROR: could not process message: $msg", 1);
return &create_xml_string(&create_xml_hash($header, $target, $source, $error_string));
}
# read log file
my $log_content;
- open(FILE, "<$act_log_file");
- my @log_lines = <FILE>;
- close(FILE);
+ open(my $FILE, "<", "$act_log_file");
+ my @log_lines = <$FILE>;
+ close($FILE);
# prepare content for xml sending
$log_content = join("", @log_lines);