fae / logging
1.0.1
2021-12-06 13:45 UTC
Requires
- monolog/monolog: 2.*
README
这是将 ARIA 日志接口简单回溯到 FAE 的一个示例。
基本使用示例
use FAE\logging\logger;
...
logger::log()->debug('This is a test with the fae log object!');
使用新通道的示例
通道允许您为例如特定子系统命名空间错误消息。
logger::log('subsystem')->debug('This is a test with the fae log object!');
使用特殊记录器的示例
默认日志接口是输出到 PHP 错误日志。您可能希望指定输出到其他位置的通道 - 例如 Slack 通道。
为此,您需要包含一个包含一个或多个处理器的数组,这些处理器将被传递到默认的 Monolog Logger
接口。
logger::register('customloggerchannel', [
new CustomHandler()
]);
logger::log('customloggerchannel')->debug('This is a test with the fae log object!');