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

Option to serialize nonStructuredArguments using toString #987

Open
schmidti159 opened this issue Sep 4, 2023 · 1 comment
Open

Option to serialize nonStructuredArguments using toString #987

schmidti159 opened this issue Sep 4, 2023 · 1 comment
Labels
help-wanted Contributions welcome type/enhancement

Comments

@schmidti159
Copy link

As described in #304 all arguments are serialized using jackson when includeNonStructuredArguments=true is set.

This might expose sensitive data through logging as not all developers might be aware that the complete object is serialized.

It would be great to have a separate configuration like serializeNonStructuredArguments (default true).
If it is set to false the arguments will not be serialized with jackson but toString will be used.

This enables the opportunity to enable includeNonStructuredArguments=true for legacy code bases where it is not feasible to analyze all existing log messages.

Does it make sense to you to add this to this lib? If yes, I could provide a PR.

@philsttr
Copy link
Collaborator

Makes sense. Contributions welcome.

I'd prefer the new flag to be named writeNonStructuredArgumentsAsString, default false.

@philsttr philsttr added help-wanted Contributions welcome type/enhancement labels Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted Contributions welcome type/enhancement
Projects
None yet
Development

No branches or pull requests

2 participants