[英]Disable “notified event” message from DEBUG log
It's a painfull job to analyse my actual dev log because the huge amount of "event.DEBUG: Notified event ..." messages. 分析我的实际开发日志是一项艰巨的工作,因为有大量的“ event.DEBUG:Notified event ...”消息。 Anyone knows how can I disable the dispatcher notification logs?
谁知道我该如何禁用调度程序通知日志?
Thanks in advance! 提前致谢!
You can use channels
to ignore events. 您可以使用
channels
忽略事件。
monolog: handlers: main: type: stream path: "%kernel.logs_dir%/%kernel.environment%.log" level: debug channels: "!event"
see details here : http://symfony.com/doc/current/cookbook/logging/channels_handlers.html#yaml-specification 在此处查看详细信息: http : //symfony.com/doc/current/cookbook/logging/channels_handlers.html#yaml-specification
The easiest way to accomplish all of this is splitting the various logging channels and levels in app/config/config_dev.yml 完成所有这些操作的最简单方法是在app / config / config_dev.yml中拆分各种日志记录通道和级别
monolog:
handlers:
event_all:
bubble: false
action_level: DEBUG
type: stream
path: %kernel.logs_dir%/%kernel.environment%_event_all.log
channels: event
event_errors:
action_level: ERROR
type: stream
path: %kernel.logs_dir%/%kernel.environment%_event_errors.log
channels: event
main:
type: stream
path: %kernel.logs_dir%/%kernel.environment%.log
level: DEBUG
Best guide for how to separate different channels and error levels is here: http://symfony.com/doc/current/cookbook/logging/monolog.html 有关如何区分不同通道和错误级别的最佳指南,请参见: http : //symfony.com/doc/current/cookbook/logging/monolog.html
Also, see here for my personal recommendations for production log separation: Symfony2 - Doctrine log 另外,请参见此处,以了解我对生产日志分离的个人建议: Symfony2-学说日志
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.