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

structured logging: print structured logs to stdout #553

Closed
minherz opened this issue Sep 27, 2021 · 1 comment · Fixed by #654
Closed

structured logging: print structured logs to stdout #553

minherz opened this issue Sep 27, 2021 · 1 comment · Fixed by #654
Assignees
Labels
api: logging Issues related to the googleapis/java-logging-logback API. lang: java Issues specific to Java. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@minherz
Copy link
Contributor

minherz commented Sep 27, 2021

Is your feature request related to a problem? Please describe.
In some cases ingesting logs directly to Cloud Logging by using Logging.write() of the client library does not work well. In its synchronous configuration the process may cause performance penalties to log intensive applications. In the asynchronous configuration some of the logs can be lost when the application runs in the Cloud environment that may experience transient failures or unexpected shutdowns. The "application" here also means a Cloud Function code.
Google Cloud provides logging agents in most of its environments (GCE requires explicit installation and configuration of the agent). The agents are capable of capturing output to STDOUT and ingesting it as log entries (per line). It can be used to delegate the log ingestion task from the application to the agent and resolve the performance problem and a potential lose of logs due to application termination.

Describe the solution you'd like
Add a configuration that will let to redirect the output of the LoggingAppender to stdout instead of calling Logging.write() API and ingesting directly to Cloud Logging.

@minherz minherz added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. lang: java Issues specific to Java. labels Sep 27, 2021
@minherz minherz self-assigned this Sep 27, 2021
@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/java-logging-logback API. label Sep 27, 2021
@minherz minherz changed the title structured logging: opt-in enable structured logging in LoggingAdapter structured logging: print structured logs to stdout Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging-logback API. lang: java Issues specific to Java. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
1 participant