-
Notifications
You must be signed in to change notification settings - Fork 38
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
Improve logging for Optional<Duration>
fields.
#22
Comments
Thank you for reporting this @alec-heif . I'll try to take a look into it this weekend. |
I thought that it would be as simple as adding custom module/serializers to change the ObjectMapper that is used internally in Log4j2.... but it looks like it is not possible to do this at the time - https://issues.apache.org/jira/browse/LOG4J2-2670 One way around that would be to serialize Trino events to JSON manually and then output them using the PatternLayout (instead of JsonLayout), with only the message and a line separator:
|
@alec-heif It also does not log logging metadata now (e.g. log level, thread, etc.) and things like "cpuTime" are logged as a timestamp with millisecond precision (instead of nested JSON object). |
There seems to be a bug in the logging for fields of type
Optional<Duration>
in at least the fields forQueryStatistics
.When examining the logs for a query I see that the
Duration
fieldscpuTime
,wallTime
, andqueuedTime
are all logged correctly asbut the
Optional<Duration>
fields seem to have the contained value dropped:The text was updated successfully, but these errors were encountered: