Skip to content
Snippets Groups Projects
Commit ac4ee017 authored by Marcos García de La Fuente's avatar Marcos García de La Fuente
Browse files

mod_syslog_syslog class shouldn't be active if openlog is not available

parent df2262f8
No related branches found
No related tags found
No related merge requests found
......@@ -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')))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment