[logp] Add typed loggers allowing log entries to go to different outputs#171
Merged
belimawr merged 26 commits intoelastic:mainfrom Apr 25, 2024
Merged
[logp] Add typed loggers allowing log entries to go to different outputs#171belimawr merged 26 commits intoelastic:mainfrom
belimawr merged 26 commits intoelastic:mainfrom
Conversation
11 tasks
aedb70a to
fc0e129
Compare
cmacknz
reviewed
Dec 21, 2023
df34ba8 to
25f61a1
Compare
Contributor
Author
|
rebased onto |
cmacknz
reviewed
Jan 17, 2024
cmacknz
reviewed
Jan 24, 2024
d55bae1 to
24878e6
Compare
Contributor
Author
|
I updated the PR with the changes required for Elastic-Agent as well. |
Contributor
Author
|
I believe that's the final version. |
Contributor
Author
|
I found a bug, I'm working on the fix and a test for it. |
9d33586 to
4aabcc7
Compare
17 tasks
b17c07c to
59acf2d
Compare
- Better name for some functions/variables - Allowing the typedLogger to have any output, its the caller's responsibility to restric output usage - Moved `typedLogger` to its own file - Updated tests accoringly
Add DefaultEventConfig function and correctly set some configuraiton options following the default logger configuration
Add error check in a test to address lint issues.
Break loop early whe `f.Key == t.Key` but the values are different.
1dca25a to
8391f6f
Compare
Contributor
Author
|
Rebased onto |
Collaborator
💚 Build Succeeded
History
cc @belimawr |
faec
approved these changes
Apr 25, 2024
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.
What does this PR do?
This commit introduces a
typedLoggerthat allows a log entry to be directed to different outputs when a configurable key/value are present in the log fields.This enables Beats (standalone and running under Elastic-Agent) to log event data to a separate log file.
Why is it important?
It is required by:
Checklist
- [ ] I have added an entry inCHANGELOG.mdWithFileOrStderrOutputto ensure it uses the correct config/level [logp] Add typed loggers allowing log entries to go to different outputs #171 (comment)Related issues