mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
"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);
|
||||
// fall-through
|
||||
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!';
|
||||
}
|
||||
@ -1426,6 +1426,8 @@ function egw_exception_handler(Exception $e)
|
||||
// logging all exceptions to the error_log
|
||||
error_log($headline.': '.$e->getMessage());
|
||||
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
|
||||
if(!isset($_SERVER['HTTP_HOST']) || $GLOBALS['egw_info']['flags']['no_exception_handler'] == 'cli')
|
||||
|
Loading…
Reference in New Issue
Block a user