[8.19] (backport #13436) Replace deprecated LoggingWithTypedOutputs - #13542
Conversation
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
|
This pull request has not been merged yet. Could you please review and merge it @orestisfl? 🙏 |
TL;DR
Remediation
Investigation detailsRoot CauseThe failing step is Evidence
Validation
Follow-up
What is this? | From workflow: PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
This pull request has not been merged yet. Could you please review and merge it @orestisfl? 🙏 |
|
This pull request has not been merged yet. Could you please review and merge it @orestisfl? 🙏 |
💛 Build succeeded, but was flaky
Failed CI StepsHistory
cc @orestisfl |
What does this PR do?
LoggingWithTypedOutputs is deprecated in favor of the Local variant which returns a localized logger instance. Use the returned logger directly via Named() instead of re-reading from global state with logp.NewLogger().
Why is it important?
Clean up of deprecated endpoints. Elastic Agent is the only caller in Elastic: https://github.com/search?q=org%3Aelastic%20LoggingWithTypedOutputs&type=code
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added an entry in./changelog/fragmentsusing the changelog toolI have added an integration test or an E2E testDisruptive User Impact
There shouldn't be any. I've tested locally and both the elastic-agent build from main and with my change seem to produce the same format of logs.
How to test this PR locally
and read the *.ndjson logs. Compare with main.
Related issues
This is an automatic backport of pull request Replace deprecated LoggingWithTypedOutputs #13436 done by Mergify.