2

I am setting up an error log , but I can't get the urls where the errors occurred

So if the error happens on http://example.com/birth/ee.php I want this url to be in the log

here is my php.ini file

allow_url_include = 1
date.timezone = "Europe/Paris"
;;; log php errors
display_startup_errors = false
display_errors = false
html_errors = false
log_errors = true
track_errors = true
error_log = /home/mysperts/public_html/example.com/birth/php-errors.log
error_reporting = E_ALL | E_STRICT
log_errors_max_len = 0
4

1 に答える 1

1

そのためにはおそらくカスタムロギングが必要になるでしょう... set_error_handlerのようなものを使用して、例外が発生したときなどにログを記録するようにコードに何かを設定します。

それ以外の場合は、タイムスタンプをaccess_logと一致させることができます;)

于 2012-03-08T21:03:41.167 に答える