opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

Request "pretty print" feature for logging exporter

Open shuwpan opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like I was following the getting started page https://opentelemetry.io/docs. I noticed the java logging exporter printing everything in single line, which is a bit hard to read. I think this would be handy feature to have.

Describe alternatives you've considered One workaround I can think of is to send the data to a collector to see some indented console logs.

Additional context screenshots are taken from https://opentelemetry.io/docs Java logs: image

shuwpan avatar Nov 09 '23 16:11 shuwpan

Since the logging exporter is only intended to be used for very rough, simple debugging, I doubt we would want to make the output style configurable. You are welcome to implement your own exporter, though, that does whatever formatting you prefer.

jkwatson avatar Nov 09 '23 17:11 jkwatson

What about JSON pretty printing from logging-otlp? Would improve readability.

jack-berg avatar Nov 09 '23 17:11 jack-berg

Since the logging exporter is only intended to be used for very rough, simple debugging, I doubt we would want to make the output style configurable. You are welcome to implement your own exporter, though, that does whatever formatting you prefer.

Simple JSON pretty print is good enough, doesn't need to be super-fancy-customisable-formatter.

shuwpan avatar Nov 09 '23 17:11 shuwpan