Skip to content

Update log level based on central configuration and support "off" configuration#1096

Merged
russcam merged 3 commits intoelastic:masterfrom
russcam:feature/central-config-loglevel
Dec 22, 2020
Merged

Update log level based on central configuration and support "off" configuration#1096
russcam merged 3 commits intoelastic:masterfrom
russcam:feature/central-config-loglevel

Conversation

@russcam
Copy link
Copy Markdown
Contributor

@russcam russcam commented Dec 18, 2020

This PR allows updating the log level of the configured IApmLogger at runtime, based on the log level received from central configuration, and also supports the "off" central configuration log level.

An ILogLevelSwitchable interface is introduced that can be implemented by an IApmLogger to allow the log level to be updated by central configuration.

ConsoleLogger implements ILogLevelSwitchable but NetCoreLogger does not. The ability to change the log level of NetCoreLogger at runtime is controlled by the provider used with Microsoft.Extensions.Logging.

Closes #970

This commit updates the log level of the configured
IApmLogger based on the log level received from
central configuration.

An ILogLevelSwitchable interface is introduced that
can be implemented by an IApmLogger to allow
the log level to be updated by central configuration.

ConsoleLogger implements ILogLevelSwitchable
but NetCoreLogger does not. The ability to change
the log level of NetCoreLogger at runtime is controlled
by the provider used with Microsoft.Extensions.Logging.

Closes elastic#970
@russcam russcam added enhancement New feature or request v1.8.0 labels Dec 18, 2020
@russcam russcam requested a review from gregkalapos December 18, 2020 05:50
@russcam russcam added this to the 7.11 milestone Dec 18, 2020
@ghost
Copy link
Copy Markdown

ghost commented Dec 18, 2020

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Branch indexing

  • Start Time: 2020-12-21T02:20:09.255+0000

  • Duration: 62 min 0 sec

Test stats 🧪

Test Results
Failed 0
Passed 13231
Skipped 0
Total 13231

@russcam
Copy link
Copy Markdown
Contributor Author

russcam commented Dec 18, 2020

jenkins please run the tests

Copy link
Copy Markdown
Contributor

@gregkalapos gregkalapos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[META 321] Add log_level spec

2 participants