Skip to content

logger does not respect application object mapper #242

@Darkvater

Description

@Darkvater

version:
io.quarkiverse.loggingjson:quarkus-logging-json 1.1.1 but also 3.0.0

current behaviour:
java.time.Instant is serialised as numbers, java.time.LocalDateTime is serialised as array of time components

expected behaviour:
I have an ObjectMapperCustomizer setup that writes out dates and friends as strings. The json serialiser of the logger should respect it's settings (e.g. use this instance) instead of creating its own serialiser.
I am aware of the existence of configuration properties that allow you to customize the json output, but apart from the fact that the date config (quarkus.log.json.fields.timestamp.date-format) is only for the timestamp fields, the application settings should be respected and not duplicated in config solely for logging purposes.

There is a similar ticket in #75, but the proposed solution of serialising the object itself is quite clunky and not usable/maintainable in a bigger project.

I think the project should hook up to be able to use CDI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions