Add listen new config param "minimum_level" error log.#44
Closed
Yozhef wants to merge 4 commits intorollbar:masterfrom
Closed
Add listen new config param "minimum_level" error log.#44Yozhef wants to merge 4 commits intorollbar:masterfrom
Yozhef wants to merge 4 commits intorollbar:masterfrom
Conversation
ArturMoczulski
suggested changes
Mar 17, 2019
Factories/RollbarHandlerFactory.php
Outdated
| }; | ||
| } | ||
|
|
||
| $this->minimumLevel = $config['minimum_level'] ?: LogLevel::ERROR; |
There was a problem hiding this comment.
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;
Author
There was a problem hiding this comment.
@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
Author
|
@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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: