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

multiple spans and attributes are concatenated without whitespace #750

Closed
fourth44 opened this issue Jul 25, 2023 · 1 comment · Fixed by #753
Closed

multiple spans and attributes are concatenated without whitespace #750

fourth44 opened this issue Jul 25, 2023 · 1 comment · Fixed by #753

Comments

@fourth44
Copy link

fourth44 commented Jul 25, 2023

When using zio.logging.consoleLogger and apply multiple spans or multiple annotations to a single log line, the list of attributes ends up as one big string without whitespace separation (as if using mkString instead of mkString(" ")). The same holds for the spans.

e.g.

timestamp=2023-07-25T14:06:15+0200 level=INFO fiberId=zio-fiber-6 message=INFO IS ON  name=com.acme.Main.run  infospan=1msanotherspan=1ms
timestamp=2023-07-25T14:06:15+0200 level=INFO fiberId=zio-fiber-6 message=LOG AT DEFAULT LEVEL  name=com.acme.Main.run annotation1=value1annotation2=value2 myspan=0ms

The log config is

"%label{timestamp}{%timestamp{yyyy-MM-dd'T'HH:mm:ssZ}} %highlight{%label{level}{%level}} %label{fiberId}{%fiberId} %label{message}{%message} %label{cause}{%cause} %label{name}{%name} %kvs %spans"

(Also I expected double qoutes around the log messages (which contain spaces). I did see that case handled in the code, but I would have to debug why that isn't happening).

@justcoon
Copy link
Contributor

@fourth44 thanks for report, i will check it

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

Successfully merging a pull request may close this issue.

2 participants