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

Support Structured Log Format #874

Open
akefirad opened this issue Dec 18, 2022 · 1 comment
Open

Support Structured Log Format #874

akefirad opened this issue Dec 18, 2022 · 1 comment
Labels
type:enhancement A general enhancement

Comments

@akefirad
Copy link

Would be great to support JSON format for logs generated during startup.

Describe the Enhancement

As is a common practice, we configured all containers to spit out logs in JSON format. However for Java (Spring Boot) application, during startup there's a few lines that are not managed by the application:

Setting Active Processor Count to 2
Calculated JVM Memory Configuration: -XX:MaxDirectMemorySize=10M -Xmx1643814K -XX:MaxMetaspaceSize=146137K -XX:ReservedCodeCacheSize=240M -Xss1M (Total Memory: 2G, Thread Count: 50, Loaded Class Count: 23387, Headroom: 0%)
Enabling Java Native Memory Tracking
Adding 124 container CA certificates to JVM truststore
Spring Cloud Bindings Enabled
Picked up JAVA_TOOL_OPTIONS: -Djava.security.properties=/layers/paketo-buildpacks_bellsoft-liberica/java-security-properties/java-security.properties -XX:+ExitOnOutOfMemoryError -XX:ActiveProcessorCount=2 -XX:MaxDirectMemorySize=10M -Xmx1643814K -XX:MaxMetaspaceSize=146137K -XX:ReservedCodeCacheSize=240M -Xss1M -XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=summary -XX:+PrintNMTStatistics -Dorg.springframework.cloud.bindings.boot.enable=true

Ideally it would be nice to let the user to configure the container to spit the above logs in JSON format.

Possible Solution

If this is not possible, another alternative would be to let the user to turn them off (if they're just info) and leave warn and error messages on.

Motivation

Simpler log aggregator configuration.

@dmikusa dmikusa added the type:enhancement A general enhancement label Dec 21, 2022
@fede843
Copy link

fede843 commented Sep 27, 2023

is there any workaround for this? I am setting up loki to ingest json logs, and this small one is breaking the config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants