Error log by INI and in script

Asked

Viewed 165 times

2

I have my error handling using the functions set_error_handler, set_exception_handler, register_shutdown_function, where I debug and write the error message with detailed information and on PHP.INI enabled the line: error_log = C:\webservice\PHP\log\erro.txt so php itself generates its error log.

The problem is that when I use the above functions, the log is not created by PHP.INI, if I don’t use the functions, then PHP.INI creates the log. It seems that the log is created either by one or the other and not together, and I would like to debug and create my log and allow PHP to create the log itself, taking 2 error logs.

I was wondering if the use of the above functions override the creation of the log by PHP, or is there a line in the INI to configure for PHP to create its own log independently of me creating my own.

  • see (http://php.net/manual/en/function.set-error-handler.php) 2nd paragraph. If you return false in callback it logs?

1 answer

1


As explained in the PHP manual of set_error_handler function:

It is important to remember that the default PHP error handler is completely ignored.

  • Does overlap occur? There is a way around this?

  • 1

    Yes it does. I don’t know if there is a way around, but it seems to me that.

  • 1

    @Papacharlie takes a look at this: http://docstore.mik.ua/orelly/weblinux2/php/ch13_04.htm

Browser other questions tagged

You are not signed in. Login or sign up in order to post.