2
votes

I'm using Symfony with Monolog to log data to loggly.com. My symfony app uses following configuration:

    loggly:
        type: loggly
        token: ...
        level: INFO
        bubble: true
        channels: ["app", "request"]

As you can see, I'm logging the channels app and request. The minimum log level is INFO for both channels.

Now i would like to distinguish the log level per channel like this:

Channel "app": INFO (and above)
Channel "request": ERROR (and above)

Is there a way to adjust my configuration or do I have to solve this programatically?

Thanks in advance
ninsky

1

1 Answers

1
votes
loggly_app:
        type: loggly
        token: ...
        level: INFO
        bubble: true
        channels: ["app"]
loggly_request:
        type: loggly
        token: ...
        level: ERROR
        bubble: true
        channels: ["request"]

an additional option would be to have environment specific configs (e.g. when app-info logging wouldn't be required in production).