【发布时间】:2016-02-01 13:19:31
【问题描述】:
我的 Symfony 应用程序根据用户的请求运行计算。我想给他们发一封电子邮件作为回复。
我在config.yml 中创建了一个自定义通道和处理程序:
# config.yml
# ...
monolog:
handlers:
buildbot:
level: info
type: stream
channels: [buildbot]
现在我从各种服务向它写入日志:
<?php
// AppBundle/Services/BuildBot.php
$this->buildLogger->info('Fabricating robot shell');
在一项服务中,我想通过“buildbot”Monolog 频道的日志行向请求者发送电子邮件。如何读取日志行?
【问题讨论】: