Utilities
- Registry: The
Monolog\Registryclass lets you configure global loggers that you can then statically access from anywhere. It is not really a best practice but can help in some older codebases or for ease of use. -
ErrorHandler: The
Monolog\ErrorHandlerclass allows you to easily register a Logger instance as an exception handler, error handler or fatal error handler. PHP does not report where warnings, notices and deprecations come from, so if you want to know which code triggered them, enable stack trace capturing, and make sure your formatter outputs them (e.g.LineFormatter::includeStacktraces()):Monolog\ErrorHandler::register($logger)->captureStackTraces(); - SignalHandler: The
Monolog\SignalHandlerclass allows you to easily register a Logger instance as a POSIX signal handler. - ErrorLevelActivationStrategy: Activates a FingersCrossedHandler when a certain log level is reached.
- ChannelLevelActivationStrategy: Activates a FingersCrossedHandler when a certain log level is reached, depending on which channel received the log record.
| ← Handlers, Formatters and Processors | Extending Monolog → |