[GH-ISSUE #447] No warning/error logs in prod environment #154

Closed
opened 2026-03-04 02:12:41 +03:00 by kerem · 2 comments
Owner

Originally created by @IcarusHU on GitHub (Nov 3, 2014).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/447

Hi,
I'm not sure whether its actually a Monolog error, but I cannot find a solution for that problem for the 3rd day, and I thought maybe you can help.

I had different monolog configurations for my dev/stage/prod env, but since I've experienced the problem, I tried to use the same for all, which is the following:

monolog:
    handlers:
        mail:
            type:               fingers_crossed
            action_level:       error
            handler:            buffered
        buffered:
            type:               buffer
            handler:            swift
        swift:
            type:               swift_mailer
            from_email:         <myemail>
            to_email:           <myemail>
            subject:            "Server Error"
            level:              debug
        db:
            type:               service
            level:              warning
            id:                 logger_database
            path:               "%kernel.logs_dir%/%kernel.environment%.log"
            formatter:          monolog.processor.request
        file:
            type:               fingers_crossed
            action_level:       info
            handler:            nested
        nested:
            type:               stream
            path:               "%kernel.logs_dir%/%kernel.environment%.log"
            level:              info
        login:
            type:               stream
            path:               "%kernel.logs_dir%/auth.log"
            level:              info
            channels:           security

The database logger is a custom bundle, from this source:
http://dionbeetson.blogspot.hu/2013/01/symfony2-logging-application-errors-to.html

The guy, who wrote the database logger bundle informed me, that his solution is for Symfony2.1, and will update it soon, however the problem is not only with the database logger.

In dev and stage environment, the logger works like a charm, everything goes to the right place, but the email sender
In production environment (I tried it on the same server changing the env to prod, and also with debug turned on and off - cache cleared, etc.) the database logger and the email sender reporting are not working, and the file loggers are only receiving <=200 level messages (app.INFO, request.INFO). Also the database debugger gets only <=200 level messages.

We though about that maybe apache error logging is the troublemaker here, but it also works with dev and stage env, so it can't be.

If the debug option is turned on in prod environment, I receive an Apache 500 error, but nothing is logged anyway..

I'm working on Amazon AWS, using PHP 5.4.20, Symfony 2.2.11

Thanks for your help or solution in advance.

Originally created by @IcarusHU on GitHub (Nov 3, 2014). Original GitHub issue: https://github.com/Seldaek/monolog/issues/447 Hi, I'm not sure whether its actually a Monolog error, but I cannot find a solution for that problem for the 3rd day, and I thought maybe you can help. I had different monolog configurations for my dev/stage/prod env, but since I've experienced the problem, I tried to use the same for all, which is the following: ``` monolog: handlers: mail: type: fingers_crossed action_level: error handler: buffered buffered: type: buffer handler: swift swift: type: swift_mailer from_email: <myemail> to_email: <myemail> subject: "Server Error" level: debug db: type: service level: warning id: logger_database path: "%kernel.logs_dir%/%kernel.environment%.log" formatter: monolog.processor.request file: type: fingers_crossed action_level: info handler: nested nested: type: stream path: "%kernel.logs_dir%/%kernel.environment%.log" level: info login: type: stream path: "%kernel.logs_dir%/auth.log" level: info channels: security ``` The database logger is a custom bundle, from this source: http://dionbeetson.blogspot.hu/2013/01/symfony2-logging-application-errors-to.html The guy, who wrote the database logger bundle informed me, that his solution is for Symfony2.1, and will update it soon, however the problem is not only with the database logger. In dev and stage environment, the logger works like a charm, everything goes to the right place, but the email sender In production environment (I tried it on the same server changing the env to prod, and also with debug turned on and off - cache cleared, etc.) the database logger and the email sender reporting are not working, and the file loggers are only receiving <=200 level messages (app.INFO, request.INFO). Also the database debugger gets only <=200 level messages. We though about that maybe apache error logging is the troublemaker here, but it also works with dev and stage env, so it can't be. If the debug option is turned on in prod environment, I receive an Apache 500 error, but nothing is logged anyway.. I'm working on Amazon AWS, using PHP 5.4.20, Symfony 2.2.11 Thanks for your help or solution in advance.
kerem closed this issue 2026-03-04 02:12:42 +03:00
Author
Owner

@stof commented on GitHub (Dec 27, 2014):

For questions about Symfony, you should ask on MonologBundle, not here.

<!-- gh-comment-id:68163481 --> @stof commented on GitHub (Dec 27, 2014): For questions about Symfony, you should ask on MonologBundle, not here.
Author
Owner

@IcarusHU commented on GitHub (Jan 5, 2015):

Hi,
thanks for your short and helpful answer after 2 months, I was hoping a bit faster and just-a-bit more helpful attitude, how should I know that it's a symfony problem and not a monolog one? I thought maybe you have faced a problem similar to this.
but ok, so you did not; don't bother with the reply, I will ask it in somewhere else. :(
have a nice day

<!-- gh-comment-id:68753622 --> @IcarusHU commented on GitHub (Jan 5, 2015): Hi, thanks for your short and helpful answer after 2 months, I was hoping a bit faster and just-a-bit more helpful attitude, how should I know that it's a symfony problem and not a monolog one? I thought maybe you have faced a problem similar to this. but ok, so you did not; don't bother with the reply, I will ask it in somewhere else. :( have a nice day
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#154
No description provided.