EasyCorp/easy-log-handler

Easy log handler not logging

TheBabaYaga opened this issue · 3 comments

I've installed the bundle and replaced the logging config in my config_dev, but now it isn't logging at all anymore. Is there a way to debug it to see what's going on?

I'm using following Symfony version:

"name": "symfony/symfony", "version": "v2.8.9", "source": { "type": "git", "url": "https://github.com/symfony/symfony.git", "reference": "df02dd5d3f7decb3a05c6d0f31054b4263625dcb" }

Let's try to debug the problem. I assume that logging is working when using the common config:

# app/config/config_dev.yml
monolog:
    handlers:
        main:
            type: stream
            path: "%kernel.logs_dir%/%kernel.environment%.log"
            level: debug
            channels: [!event]
        console:
            type:   console
            channels: [!event, !doctrine]

Now, can you replace that config by the following?

# app/config/config_dev.yml
monolog:
    handlers:
        buffered:
            type:     buffer
            handler:  easylog
            channels: ["!event"]
            level:    debug
        easylog:
            type: service
            id:   easycorp.easylog.handler
        main:
            type: stream
            path: "%kernel.logs_dir%/%kernel.environment%.log"
            level: debug
            channels: [!event]
        console:
            type:   console
            channels: [!event, !doctrine]

The app/logs/dev.log should now contain both the old Symfony logs and the new EasyLog logs. If not: Do you see any error in the app? Do you see any log in dev.log?

With the second config I just see my regular default log data, but not the EasyLog logs.
screen shot 2016-08-17 at 10 21 17

@javiereguiluz version 1.0.1 fixed this issue and #3 as well! Thanks!