forked from extern/egroupware
"some more info for error_log on Exceptions: Instance, User & URL causing the exception"
This commit is contained in:
parent
f1855baac2
commit
a6836fb367
@ -54,7 +54,7 @@ function array2string($var)
|
|||||||
$type = get_class($var);
|
$type = get_class($var);
|
||||||
// fall-through
|
// fall-through
|
||||||
case 'array':
|
case 'array':
|
||||||
return $type.str_replace(array("\n",' ','array'),'',print_r($var,true));
|
return $type.str_replace(array("\n",' ','Array'),'',print_r($var,true));
|
||||||
}
|
}
|
||||||
return 'UNKNOWN TYPE!';
|
return 'UNKNOWN TYPE!';
|
||||||
}
|
}
|
||||||
@ -1426,6 +1426,8 @@ function egw_exception_handler(Exception $e)
|
|||||||
// logging all exceptions to the error_log
|
// logging all exceptions to the error_log
|
||||||
error_log($headline.': '.$e->getMessage());
|
error_log($headline.': '.$e->getMessage());
|
||||||
foreach(explode("\n",$e->getTraceAsString()) as $line) error_log($line);
|
foreach(explode("\n",$e->getTraceAsString()) as $line) error_log($line);
|
||||||
|
error_log('# Instance='.$GLOBALS['egw_info']['user']['domain'].', User='.$GLOBALS['egw_info']['user']['account_lid'].', URL='.
|
||||||
|
($_SERVER['HTTPS']?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
|
||||||
|
|
||||||
// exception handler for cli (command line interface) clients, no html
|
// exception handler for cli (command line interface) clients, no html
|
||||||
if(!isset($_SERVER['HTTP_HOST']) || $GLOBALS['egw_info']['flags']['no_exception_handler'] == 'cli')
|
if(!isset($_SERVER['HTTP_HOST']) || $GLOBALS['egw_info']['flags']['no_exception_handler'] == 'cli')
|
||||||
|
Loading…
Reference in New Issue
Block a user