mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Option to log critical errors added. ie. define('e_LOG_CRITICAL', true);
This commit is contained in:
parent
583a11dca8
commit
43db0d2ae4
@ -1888,6 +1888,8 @@ function message_handler($mode, $message, $line = 0, $file = '')
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
e107_require_once(e_HANDLER.'message_handler.php');
|
e107_require_once(e_HANDLER.'message_handler.php');
|
||||||
show_emessage($mode, $message, $line, $file);
|
show_emessage($mode, $message, $line, $file);
|
||||||
}
|
}
|
||||||
|
@ -1079,6 +1079,17 @@ $SYSTEM_DIRECTORY = "e107_system/";</pre>
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(defined('e_LOG_CRITICAL'))
|
||||||
|
{
|
||||||
|
$date = date('r');
|
||||||
|
file_put_contents(e_LOG.'criticalError.log',$date."\t\t". strip_tags($message)."\n", FILE_APPEND);
|
||||||
|
$message = LAN_ERROR_46; // "Check log for details";
|
||||||
|
$line = null;
|
||||||
|
$file = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!defined('HEADERF'))
|
if(!defined('HEADERF'))
|
||||||
{
|
{
|
||||||
echo $errorHead;
|
echo $errorHead;
|
||||||
|
@ -62,4 +62,5 @@ define('LAN_ERROR_43', "Site unavailable temporarily");
|
|||||||
define('LAN_ERROR_44', "Site logo");
|
define('LAN_ERROR_44', "Site logo");
|
||||||
|
|
||||||
define('LAN_ERROR_45', "What can you do now?");
|
define('LAN_ERROR_45', "What can you do now?");
|
||||||
|
define('LAN_ERROR_46', "Check log for details.");
|
||||||
?>
|
?>
|
Loading…
x
Reference in New Issue
Block a user