error_log in the same directory as included files?
pI've researched different methods and directives including:/p ul
liauto_prepend_file/li li.user.ini files/li ligetcwd()/li
lidebug_backtrace()/li /ul pAnd I can't seem to find a way to change the
path of the error_log to log in the same path as the file being
included/required./p pFor example, say index.php has the line: /p
precode`include('subdir/file.php');` /code/pre pIf
codesubdir/file.php/code has a syntax error, forcing php to create
codesubdir/error_log/code, rather than the default behavior of creating
error_log in the same path as codeindex.php/code, auto_prepend_file
suffers from this same limitation as it prepends the specified file before
the first script called, rather than each file included. /p pI've looked
around and can't seem to find a legitimate way to do this. I understand
the implications of performance overhead by doing this, and plan to only
use it for development purposes. I believe this can help isolate errors
rather than using stack traces such as codedebug_backtrace()/code, as I
can use a terminal script to show the last error logs by last modified,
and find the offending files much quicker than reading through a massive
error log. /p pMy goal is ultimately not to have these files appear at
all, obviously, as debugging already existing sites and having to go
through a 10GB error logs or codetail/code/codemultitail/codeing it can be
somewhat cumbersome. I'm trying to devise this method so errors can be
isolated by path. Any suggestions? /p
No comments:
Post a Comment