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 custom configurable separator for console logger before start of the message. #1427

Open
s3rj1k opened this issue Apr 7, 2024 · 0 comments

Comments

@s3rj1k
Copy link

s3rj1k commented Apr 7, 2024

Describe the solution you'd like
It would be nice to have custom configurable separator for console logger before start of the message similar to how now is general separator is configured, so that log lines can be configured as follows:

2024-04-07T12:39:51Z	INFO	local/main.go:19	Server is running	{"addr": ":8080"}

vs

2024-04-07T12:39:51Z	INFO	local/main.go:19]	Server is running	{"addr": ":8080"}

Basically adding ]<TAB> (configurable opt-in) as delimiter between start of message and all other default fields.

Describe alternatives you've considered
Alternative would be to implement custom console_encoder but it feels like an overkill for adding single additional opt-in delimiter.

Is this a breaking change?
Change is backwards compatible, just adds new field in EncoderConfig that will only be processed by console encoder with the default value of ConsoleSeparator field. (New field can be named ConsoleMessageWithFieldsSeparator)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants