Skip to content
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 auto_ecs_logging config #1058

Merged
merged 3 commits into from
Mar 8, 2021
Merged

Add auto_ecs_logging config #1058

merged 3 commits into from
Mar 8, 2021

Conversation

basepi
Copy link
Contributor

@basepi basepi commented Mar 3, 2021

What does this pull request do?

Adds a new config value, called auto_ecs_logging, which defaults to False. If the user sets this value to True (and has ecs_logging installed), we will do two things:

  1. Call setFormatter(ecs_logging.StdlibFormatter()) on each of the handlers on the root logger
  2. Set the default processor for structlog (if installed) to ecs_logging.StructlogFormatter().

I also documented the new setting and added a test.

Related issues

Closes #1006

@apmmachine
Copy link
Contributor

apmmachine commented Mar 3, 2021

💚 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: Pull request #1058 updated

  • Start Time: 2021-03-04T16:56:54.866+0000

  • Duration: 19 min 46 sec

  • Commit: d32cd28

Test stats 🧪

Test Results
Failed 0
Passed 7940
Skipped 5735
Total 13675

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 7940
Skipped 5735
Total 13675

Copy link
Contributor

@beniwohli beniwohli left a comment

Choose a reason for hiding this comment

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

LGTM!

@basepi basepi merged commit 45e6e1c into elastic:master Mar 8, 2021
@basepi basepi added this to the 7.12 milestone Mar 9, 2021
beniwohli pushed a commit to beniwohli/apm-agent-python that referenced this pull request Sep 14, 2021
* Implement auto_ecs_logging config and docs

* Add a test for auto_ecs_logging

* Changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[META 373] Support replacement of plain-text formatters with ECS formatters
3 participants