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

Add support for logging in json or other structured format #496

Open
johnksv opened this issue Sep 17, 2024 · 2 comments
Open

Add support for logging in json or other structured format #496

johnksv opened this issue Sep 17, 2024 · 2 comments

Comments

@johnksv
Copy link
Contributor

johnksv commented Sep 17, 2024

This will increase observability of the logs when using external logging explorer tools
P.t. the default spring log format is used:
e.g. 2024-09-17T10:32:03.991Z INFO 7 --- [ main] fr.insee.onyxia.api.Application : No active profile set, falling back to 1 default profile: "default"

Proposal, something like:

{
"timestamp": "2024-09-17T10:32:03.991Z"
"process_id": 7
"thread": "main"
"log_level": "INFO"
"logger_name": "fr.insee.onyxia.api.Application"
"message": "No active profile set, falling back to 1 default profile: \"default\"`"
}
@olevitt
Copy link
Contributor

olevitt commented Sep 20, 2024

Hi !

I'm all in favor for this ! After doing some research, I found this : https://spring.io/blog/2024/08/23/structured-logging-in-spring-boot-3-4
Structured logging is coming to spring boot in the next version.
So I suggest we wait a few weeks (should not be long now, spring has already released 2 MC versions).

@olevitt
Copy link
Contributor

olevitt commented Sep 27, 2024

Hi !

I'm all in favor for this ! After doing some research, I found this : https://spring.io/blog/2024/08/23/structured-logging-in-spring-boot-3-4 Structured logging is coming to spring boot in the next version. So I suggest we wait a few weeks (should not be long now, spring has already released 2 MC versions).

According to https://calendar.spring.io/ it's due to release on november 21.
Hope that's okay with you @johnksv. We will make sure to implement the structured logging shortly after the release.

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