【发布时间】:2019-09-02 07:33:29
【问题描述】:
我有一个连接到 Redis 的工作 ELK 堆栈。
我还有一个正在运行的无状态 Symfony 4 应用程序,我想将所有生产日志发送到我的 Redis。
我知道 Monolog 有一个 Redis 处理程序,但我不知道如果有其他方法,我应该如何调整 config/prod/monolog.yaml 文件来完成此操作。
这就是现在的样子:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404]
nested:
type: stream
path: "php://stderr"
level: debug
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
path: "php://stderr"
deprecation_filter:
type: filter
handler: deprecation
max_level: info
channels: ["php"]
【问题讨论】:
标签: symfony redis symfony4 monolog