mod_syslog_syslog class shouldn't be active if openlog is not available
This commit is contained in:
parent
df2262f8be
commit
ac4ee01723
@ -35,6 +35,12 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
|
||||
*/
|
||||
public function isActive()
|
||||
{
|
||||
// This function does not exists on some ISP (Ex: Free in France)
|
||||
if (!function_exists('openlog'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -85,12 +91,6 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
|
||||
*/
|
||||
public function export($content)
|
||||
{
|
||||
// This function does not exists on some ISP (Ex: Free in France)
|
||||
if (!function_exists('openlog'))
|
||||
{
|
||||
throw new Exception('Function openlog is not available in this server');
|
||||
}
|
||||
|
||||
if (defined("SYSLOG_FACILITY") && constant("SYSLOG_FACILITY"))
|
||||
{
|
||||
if (constant(constant('SYSLOG_FACILITY')))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user