quarkiverse / quarkus-logging-json

Quarkus logging extension outputting the logging in json.
Apache License 2.0
62 stars 29 forks source link

The console has custom fields, the log file does not #261

Open KricYi opened 1 year ago

KricYi commented 1 year ago

@Override public void writeTo(JsonGenerator generator, ExtLogRecord event) throws IOException { generator.writeStringField("traceId", Span.current().getSpanContext().getTraceId()); // Will be added to every log, as a field on the json. }

SlyngDK commented 1 year ago

I can't read from issue description, what the issue is handling about.

KricYi commented 1 year ago

The console can print my custom traceId, but there is no traceId field in the log file。

I want to extract mdc.traceId to the root traceId