2

我有一个工作人员需要重试使用一些消息,直到可以使用外部服务来存储它们,这仅在工作时间可用,但可以随时生成事件。

一切都按预期工作,我正在记录 stderr 和 stout 以实现可追溯性。这是一个商业决策,现在有办法解决,所以没有 .log 文件。但是 symfony messenger 似乎正在输出大量数据,主要与重新交付和延迟标记有关,而且我的日志已经失控了。

这些输出没有有价值的信息,似乎是序列化的邮票。每小时有数千个:

:67:\\\"\\0Symfony\\\\Component\\\\Messenger\\\\Stamp\\\\RedeliveryStamp\\0...
:51:\\\"\\0Symfony\\\\Component\\\\Messenger\\\\Stamp\\\\DelayStamp\\0delay...

我没有自定义中间件,我自己的代码中也没有打印任何内容。

我尝试将独白配置为忽略与信使和教义相关的条目,但没有运气:

channels: ["!event", "!doctrine", "!messenger", "!security"]

这就是我的 messenger.yaml 的样子:

framework:
    messenger:
        failure_transport: failed

        transports:
            failed: 'doctrine://default?queue_name=failed'
            async:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
                retry_strategy:
                    max_retries: 14400
                    delay: 300000
                    multiplier: 1
                    max_delay: 300000
                options:
                    queue_name: redacted_queue_name
        routing:
            'App\Domain\UserCreatedEvent [async]

我是否缺少一些明显的方法来禁用此输出?

编辑:这就是我的 monolog.yaml 的样子:

monolog:
    handlers:
        main:
            type: fingers_crossed
            action_level: error
            handler: nested
            excluded_http_codes: [404, 405]
            path: "php://stdout"
            channels: ["!event", "!doctrine", "!messenger", "!security"]
        nested:
            type: stream
            path: "php://stdout"
            channels: ["!event", "!doctrine", "!messenger", "!security"]
        console:
            level: warning
            type: console
            process_psr_3_messages: false
            channels: ["!event", "!doctrine", "!messenger", "!security"]
        deprecation:
            type: stream
            path: "php://stdout"
        deprecation_filter:
            type: filter
            handler: deprecation
            max_level: info
            channels: ["php"]
4

0 回答 0