Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messagenger logs INFO log level in prod.log #43077

Closed
zim32 opened this issue Sep 17, 2021 · 3 comments
Closed

Messagenger logs INFO log level in prod.log #43077

zim32 opened this issue Sep 17, 2021 · 3 comments

Comments

@zim32
Copy link

zim32 commented Sep 17, 2021

Symfony version(s) affected: 5.2.6

Description
I have a lot of log message in my prod.log file

[2021-09-17T12:48:31.459929+02:00] messenger.INFO: Message App\Message\SomeMessage handled by App\MessageHandler\SomeHandle::__in
....

Event if I have monolog config that prevents loging this level

monolog:
    handlers:
        main:
            type: fingers_crossed
            action_level: error
            handler: nested
            excluded_http_codes: [404, 405]
            buffer_size: 50 # How many messages should be saved? Prevent memory leaks
        nested:
            type: stream
            path: "%kernel.logs_dir%/%kernel.environment%.log"
            level: debug
        console:
            type: console
            process_psr_3_messages: false
            channels: ["!event", "!doctrine"]

As I understand this configuration tells that fingers_crossed will be activated only on error level and go to neseted handler.
Why I have INFO messages in my prod.log file?

@javaDeveloperKid
Copy link
Contributor

javaDeveloperKid commented Sep 17, 2021

You probably encountered a problem solved in this PR #41163

@Tobion
Copy link
Member

Tobion commented Sep 17, 2021

You likely have an error log which triggered outputting all the other logs, including the info logs from before.

@Tobion Tobion closed this as completed Sep 17, 2021
@javaDeveloperKid
Copy link
Contributor

You likely have an error log which triggered outputting all the other logs, including the info logs from before.

Actually SendFailedMessageForRetryListener logs with an ERROR level and in combination with the issue I've mentioned this is why the guy has multiple INFO logs that are not associated with the actual message that triggered an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants