-
-
Notifications
You must be signed in to change notification settings - Fork 238
Add enabled parameter in configuration #482
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
base: 3.x
Are you sure you want to change the base?
Conversation
->end() | ||
->end() | ||
->scalarNode('id')->end() // service & rollbar | ||
->scalarNode('enabled')->defaultTrue()->end() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it intended that this is not a booleanNode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, a booleanNode
should be used here because this value is used during compilation and cannot accept an environment variable.
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this feature useful. Could you like to rebase your PR on the branch 3.x (we moved files), and add a test case in FixtureMonologExtensionTestCase?
->end() | ||
->end() | ||
->scalarNode('id')->end() // service & rollbar | ||
->scalarNode('enabled')->defaultTrue()->end() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, a booleanNode
should be used here because this value is used during compilation and cannot accept an environment variable.
This feature aims to separate the enabling of handlers based on the environment.
Use Case :
You have 3 servers on your project : dev, staging, and prod
Currently, you can't disable handlers for a specific environment. For an instance, you can't disable logging only in your staging environment.
With the enabled parameter, you are able to disable logging only in the staging environment.