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

logger does not respect application object mapper #242

Open
Darkvater opened this issue May 23, 2023 · 1 comment
Open

logger does not respect application object mapper #242

Darkvater opened this issue May 23, 2023 · 1 comment

Comments

@Darkvater
Copy link

Darkvater commented May 23, 2023

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.

@s-seidel
Copy link

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

No branches or pull requests

2 participants