2014-05-27 Ramon Novoa <rnovoa@artica.es>

* lib/PandoraFMS/Tools.pm: If no logfile is defined print the message to
	  stdout.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10022 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2014-05-27 15:01:16 +00:00
parent c5ec3ebb55
commit fd703580d1
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-05-27 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Tools.pm: If no logfile is defined print the message to
stdout.
2014-05-27 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/Core.pm: Make sure critical_str and warning_str are valid

View File

@ -413,6 +413,11 @@ sub logger ($$;$) {
$level = 1 unless defined ($level);
return if ($level > $pa_config->{'verbosity'});
if (!defined($pa_config->{'logfile'})) {
print strftime ("%Y-%m-%d %H:%M:%S", localtime()) . " [V". $level ."] " . $message . "\n";
return;
}
my $file = $pa_config->{'logfile'};
# Log rotation