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

feat(slog): Allow overriding the log message key #16242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexgokhale
Copy link

Summary

This PR adds a config option which controls the message key used for structured logs, which currently defaults to the slog.MessageKey value of "msg".

This is particularly useful for changing the key from msg to message, to allow automatic log parsing into certain log processing pipelines (without having to use another tool like fluentbit).

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #16241

This adds a config option which controls the message key used for
structured logs, which currently defaults to the `slog.MessageKey` value
of "msg".
@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Nov 28, 2024
@alexgokhale
Copy link
Author

!signed-cla

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow configuration of the message key in structured logs
1 participant