Forum Moderators: coopster
// Error logging
ini_set( 'log_errors', 1 );
ini_set( 'display_errors', 0 );
ini_set( 'error_log', LOG_DIR . '/Log - PHP Errors.txt' );
ini_set('ignore_repeated_errors',0);
The problem with this is that the same PHP script is used for more than one site and it is hard to track does the source of the errors. Can anyone suggest a method of appending a string to each logged message so that extra information can be included into the log entry?
I am aware that I could use the following code to split it into a log file per site:
ini_set('error_log', LOG_DIR.'/'.$_SERVER['HTTP_HOST'].'/Log - PHP Errors.txt' );
but I would like to also append extra information such as the Referer, IP and some other variables to the message that will help me recreate the error conditions.