Skip to content
Advertisement

Paketo BuildPacks Java JSON Log for Spring Boot Application

We are using Paketo BuildPacks for our Spring Boot application. We configured all logs to be JSON written to STDOUT. The issue is that there’s a few lines of logs by Paketo during startup:

JavaScript

Is there any way to configure Paketo to print the above as JSON:

JavaScript

Advertisement

Answer

No, sorry. The logging format in Paketo Buildpacks, and the helpers (technical name is exec.d processes) that get installed, are not configurable at this time.

There is some work that has been done in libcnb which is the upstream library that the Java-related buildpacks use that would allow customized loggers. In theory, it should be possible to allow changing to a JSON-based logging format. That would require the v2.0 of the library which has yet to be released.

I suggest adding this as a suggestion for the 2023 Roadmap. There’s presently a discussion going on where the project is soliciting new features. You can also open an issue under the Java buildpack for tracking.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement