-
Notifications
You must be signed in to change notification settings - Fork 227
Add log_level config #946
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 log_level config #946
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Steps errors
Expand to view the steps failures
|
💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
Also refactored one of the `call_callbacks` methods to `call_all_callbacks` for clarity.
This allows for callbacks to be config aware, and makes the full config available to callback functions.
I still need to figure out why the integration tests are failing... |
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.
This looks great!
daeea2b
to
5bf29a0
Compare
Previously, this didn't actually do anything because log_level was not an established config value for the python agent. As of elastic/apm-agent-python#946 this is now a setting in python and it was causing tests to fail due to the way python logging works. This PR cleans up all of those references and will make tests pass.
These tests should pass once elastic/apm-integration-testing#962 is merged. |
* Remove ELASTIC_APM_LOG_LEVEL from python stuff Previously, this didn't actually do anything because log_level was not an established config value for the python agent. As of elastic/apm-agent-python#946 this is now a setting in python and it was causing tests to fail due to the way python logging works. This PR cleans up all of those references and will make tests pass. * Remove default for --apm-log-level All uses of this setting use `self.options.get` with a default, so we can remove the default in `argparse`. This allows the python agent to only use this setting if it's explicitly set, which is better for how the python agent's `log_level` works. * Fix lint
* Remove unused arg from conf.setup_logging * Add ValidValuesValidator * Add tests for ValidValuesValidator * Add support for callbacks_on_default Also refactored one of the `call_callbacks` methods to `call_all_callbacks` for clarity. * Add log_level config with stubbed callback * Don't run callbacks on copy operations * Move callbacks to the end of any update() operation This allows for callbacks to be config aware, and makes the full config available to callback functions. * Add log_file/size and implement logging setup callback * Fix docs link * Add changelog * Audit logger calls * Don't mess with global logging library * Add tests * Fix missing arg for ConfigurationError * Import logging.handlers * Implement review suggestions * Fix windows tests * Don't set log_level by default * Better handling for callbacks if default is None * With new default handling, don't need to check for new_value * Allow `warn` in addition to `warning` for log_level
Adds support for configurable
log_level
.Spec
Related issues
Closes #941