-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add listen new config param "minimum_level" error log. #44
Conversation
Factories/RollbarHandlerFactory.php
Outdated
} | ||
|
||
$this->minimumLevel = $config['minimum_level'] ?: LogLevel::ERROR; |
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.
Same here, I recommend using monolog_minimum_level
for the config option name as suggested in rollbar/rollbar-php#440 (review)
Also, I think isset($config['minimum_level'])
is needed here as I get PHP notices if minimum_level
is not set in rollbar.yaml
:
$this->minimumLevel = isset($config['minimum_level']) ? $config['minimum_level'] : LogLevel::ERROR;
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.
@ArturMoczulski okay, i change it validation, but I do not like the name of this option. I answer rollbar/rollbar-php#440 (review)
9ef0e05
to
1cec8e1
Compare
@ArturMoczulski I added as you requested, but I think verification is not required because we add I think if we add to (default, config) value need on code only get.
|
1cec8e1
to
6aed6c7
Compare
38fa40a
to
37be9b5
Compare
Let's continue this work in #46 |
Hello everybody.
Problem:
In the project, I am currently working on it. There is a createRollbarHandler function in the RollbarHandlerFactory class. This LogLevel parameter accepts only Error / Critical values. It would be great if it is possible to put it. Because info info includes
Warning / Warning / Error / Critical
.Solution for the problem:
I created you PR on rollbar-php when i add new param in config
minimum_level
, and this i use him and determine which error level is required.Example config: