【发布时间】:2015-05-03 15:46:57
【问题描述】:
在独白中,您可以排除路径,以便在发生异常时不会登录到 prod.log
我想从 /items/* 中排除所有日志,所以我做了以下操作:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: file
channels: ["!doctrine", "!event", "!security", "!request"]
excluded_404s:
- ^/items/
我想排除 /items/19283712 和任何具有 /items/WHATEVERCRAPINHERE 的错误。 here 显示的文档详细说明了如何执行此操作。我已经尝试了上面的正则表达式,它似乎不起作用。这是为什么呢?
【问题讨论】:
-
在模式末尾添加 --> .*
-
@MBarnett 所以^/items/.*
-
试试
^/items/*或^/items/~
标签: php regex symfony yaml monolog