fix to correctly take the path of the logs to be monitored.
This commit is contained in:
parent
b082910ca6
commit
931610e774
|
@ -743,8 +743,12 @@ while (my ($key, $value) = each (@{$plugin_setup{"log"}})) {
|
||||||
if (defined($value->{"log_location_multiple"})){
|
if (defined($value->{"log_location_multiple"})){
|
||||||
$log_filename_multiple = $value->{"log_location_multiple"};
|
$log_filename_multiple = $value->{"log_location_multiple"};
|
||||||
$log_create_module_for_each_log = $value->{"module_for_each_log"};
|
$log_create_module_for_each_log = $value->{"module_for_each_log"};
|
||||||
#my @buffer = `dir "$log_filename_multiple" /b /a-d`;
|
my @buffer;
|
||||||
my @buffer = `ls -d "$log_filename_multiple"`;
|
if($^O =~ /win/i){
|
||||||
|
@buffer = `dir "$log_filename_multiple" /b /a-d`;
|
||||||
|
}else{
|
||||||
|
@buffer = `ls -d "$log_filename_multiple"`;
|
||||||
|
}
|
||||||
foreach (@buffer) {
|
foreach (@buffer) {
|
||||||
# This should solve problems with carriage return in Unix, Linux and Windooze
|
# This should solve problems with carriage return in Unix, Linux and Windooze
|
||||||
chomp($_);
|
chomp($_);
|
||||||
|
@ -757,6 +761,7 @@ while (my ($key, $value) = each (@{$plugin_setup{"log"}})) {
|
||||||
$module_name_multiple =~ s/\//_/g;
|
$module_name_multiple =~ s/\//_/g;
|
||||||
$module_name_multiple = $module_name . "_" . $module_name_multiple;
|
$module_name_multiple = $module_name . "_" . $module_name_multiple;
|
||||||
}
|
}
|
||||||
|
$log_filename = $log_filename_multiple . $_;
|
||||||
manage_logfile ($log_filename, $module_name_multiple, $readall, $type, $regexp, $description);
|
manage_logfile ($log_filename, $module_name_multiple, $readall, $type, $regexp, $description);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue