php - how to write an individual error_log for each file
892
How can I set up a distinct separate error_log for each file?
I tried putting the following line in an include that goes in all files but didn't seem to work.
ini_set('error_log ', str_replace('.php', '', __FILE__));
Is there a way to do it?
Answer
Solution:
I solved this by declaring a new var before the include with the
__FILE__
value.and inside the headers.php I check if that variable is set then use it to set the error_log.