Merge branch 'ent-6146-10181-cambio-en-el-plugin-de-kafka' of brutus.artica.es:artica/pandorafms into ent-6146-10181-cambio-en-el-plugin-de-kafka
This commit is contained in:
commit
ab34a7daa8
|
@ -34,7 +34,7 @@ our @ISA = qw(Exporter);
|
||||||
|
|
||||||
# version: Defines actual version of Pandora Server for this module only
|
# version: Defines actual version of Pandora Server for this module only
|
||||||
my $pandora_version = "7.0NG.752";
|
my $pandora_version = "7.0NG.752";
|
||||||
my $pandora_build = "210205";
|
my $pandora_build = "210202";
|
||||||
our $VERSION = $pandora_version." ".$pandora_build;
|
our $VERSION = $pandora_version." ".$pandora_build;
|
||||||
|
|
||||||
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
|
||||||
|
@ -991,16 +991,17 @@ sub logger {
|
||||||
my ($conf, $tag, $message) = @_;
|
my ($conf, $tag, $message) = @_;
|
||||||
my $file = $conf->{'log'};
|
my $file = $conf->{'log'};
|
||||||
|
|
||||||
print_error($conf, "[ERROR] Log file is not defined.", 0, 1) unless defined($file);
|
print_error($conf, "[ERROR] Log file is not defined. exit 1;
|
||||||
|
|
||||||
# Log rotation
|
|
||||||
if (defined($file) && -e $file && (stat($file))[7] > 32000000) {
|
|
||||||
rename ($file, $file.'.old');
|
|
||||||
}
|
}
|
||||||
my $LOGFILE;
|
|
||||||
if ($log_aux_flag == 0) {
|
print_module($conf, {
|
||||||
# Log starts
|
name => (empty($conf->{'global_plugin_module'})?"Plugin execution result " . $0:$conf->{'global_plugin_module'}),
|
||||||
if (! open ($LOGFILE, "> $file")) {
|
type => "generic_proc",
|
||||||
|
value => $value,
|
||||||
|
desc => $msg,
|
||||||
|
});
|
||||||
|
exit 1;
|
||||||
|
{
|
||||||
print_error ($conf, "[ERROR] Could not open logfile '$file'", 0, 1);
|
print_error ($conf, "[ERROR] Could not open logfile '$file'", 0, 1);
|
||||||
}
|
}
|
||||||
$log_aux_flag = 1;
|
$log_aux_flag = 1;
|
||||||
|
|
Loading…
Reference in New Issue