Utilities
Registry: The Monolog\Registry
class 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.
Monolog\Registry
允许我们配置全局的logger
,并且我们可以全局静态访问,这虽然不是最佳实践,但可以在某些老的代码库中提供一些帮助或者仅仅只是简单使用。
ErrorHandler: The Monolog\ErrorHandler
class allows you to easily register a Logger instance as an exception handler, error handler or fatal error handler.
Monolog\ErrorHandler
允许我们注册一个Logger
实例作为一个异常处理句柄,错误处理句柄或者致命错误处理句柄。
ErrorLevelActivationStrategy: Activates a FingersCrossedHandler when a certain log level is reached.
当达到某个日志等级的时候激活 FingersCrossedHandler
。
ChannelLevelActivationStrategy: Activates a FingersCrossedHandler when a certain log level is reached, depending on which channel received the log record.
当达到某个日志等级的时候激活 FingersCrossedHandler
,取决于哪个通道收到日志信息。