Description
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
)
Activity