php - change error log output format: ini_set('error_append_string', 'string') and ini_set('error_prepend_string', 'string') does nothing -
this tell php do:
<?php error_reporting(e_all); ini_set('display_errors', '0'); ini_set('log_errors', 1); ini_set('error_log', 'errors.log'); ini_set('error_append_string', 'app'); ini_set('error_prepend_string', 'pre'); ?>
hoping errors reported in 1 file, "pre" before message , "app" after message. (my goal make pre , app /n /r or something...)
but error reporting log looks this:
[14-may-2013 00:16:26] php notice: undefined variable: nonexistentvariable in /home/www/dir/index.php on line 14[14-may-2013 00:16:28] php notice: undefined variable: nonexistentvariable in /home/www/dir/index.php on line 14
no pre, no app...
how in there, error reporting file have each error on newline, rather loooong string of errors that's not helpful me?
edit: noticed ini_set('display_errors', '1'); "app" , "pre" strings displayed on page, in error message.
that means need find out can change format how php logs errors. example whole timestamp thing - specified?
edit: not possible change way php logs errors, have make own error handler.
answer: achieve going to, asked different question (to more precise). how change way php writes errors in error log file?
as documentation says nothing that, have tested example. realized error_append/prepend_string
works displayed not logged errors
my goal make pre , app /n /r or something...
you should use regex that. should possible, every log messages starts same prefix. prepare one....
Comments
Post a Comment