Permalink
Browse files

fix(logging): make clearer exception numbers are timestamps

Fixes #9924
  • Loading branch information...
mrclay committed Jul 2, 2016
1 parent fbe8ff6 commit 9c70596e591198a72a713218ecdaf780f33539c2
Showing with 4 additions and 4 deletions.
  1. +3 −3 engine/lib/elgglib.php
  2. +1 −1 views/failsafe/messages/exceptions/exception.php
View
@@ -796,7 +796,7 @@ function elgg_trigger_plugin_hook($hook, $type, $params = null, $returnvalue = n
*/
function _elgg_php_exception_handler($exception) {
$timestamp = time();
error_log("Exception #$timestamp: $exception");
error_log("Exception at time $timestamp: $exception");
// Wipe any existing output buffer
ob_end_clean();
@@ -852,8 +852,8 @@ function _elgg_php_exception_handler($exception) {
$timestamp = time();
$message = $e->getMessage();
http_response_code(500);
echo "Fatal error in exception handler. Check log for Exception #$timestamp";
error_log("Exception #$timestamp : fatal error in exception handler : $message");
echo "Fatal error in exception handler. Check log for Exception at time $timestamp";
error_log("Exception at time $timestamp : fatal error in exception handler : $message");
}
}
@@ -15,6 +15,6 @@
<span title="Unrecoverable Error">
<?php echo elgg_echo('exception:contact_admin'); ?>
<br /><br />
Exception #<?php echo $vars['ts']; ?>.
Exception at time <?php echo $vars['ts']; ?>.
</span>
</p>

0 comments on commit 9c70596

Please sign in to comment.