php - Monolog: how to catch all errors and exceptions -


i'm missing obvious.

how can make monolog record php errors, php user errors, , exceptions?

before using monolog, wrote own functions passed set_error_handler(), register_shutdown_function() , set_exception_handler(). there way of doing using monolog's api, or have following?

  1. write error handler , exception handler pass php's functions above
  2. in handlers, call appropriate monolog functions such logger::adderror(...) using switch statement or similar

surely there must monolog api above in single call?

old question since not yet answered - errorhandler you're after.

from the documentation:

errorhandler: monolog\errorhandler class allows register logger instance exception handler, error handler or fatal error handler.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -