-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(cloud-logging): removing Logstash dependencies, using Cloud Logging Logback #10274
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
Merged
Kef131
merged 4 commits into
GoogleCloudPlatform:main
from
Kef131:fix(cloud_logging)-remove-logstash-lib-change-for-cloud-logging
Jun 1, 2026
+57
−37
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fa28421
refactor: migrate Logstash logging to MDC and Google Cloud Logging ap…
Kef131 8a50e14
build: removed Jacoco library override and skip for local testing, no…
Kef131 77d6e3e
fix: restore original System.out in AppTest teardown to prevent side …
Kef131 fa9c400
docs: add output_structured_log.md example for Cloud Run manual logging
Kef131 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <!-- [START cloudrun_manual_logging_output] --> | ||
| {"severity":"INFO","time":"YYYY-MM-DDTHH:MM:SS.SSSZ","logging.googleapis.com/labels":{"component":"arbitrary-property","levelName":"INFO","loggerName":"com.example.cloudrun.App","levelValue":"20000"},"logging.googleapis.com/trace_sampled":false,"message":"This is the default display field."} | ||
| <!-- [END cloudrun_manual_logging_output] --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,20 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- [START cloudrun_manual_logging_logback] --> | ||
| <configuration> | ||
| <appender name="jsonConsoleAppender" class="ch.qos.logback.core.ConsoleAppender"> | ||
| <encoder class="net.logstash.logback.encoder.LogstashEncoder"> | ||
| <!-- Ignore default logging fields --> | ||
| <fieldNames> | ||
| <timestamp>[ignore]</timestamp> | ||
| <version>[ignore]</version> | ||
| <logger>[ignore]</logger> | ||
| <thread>[ignore]</thread> | ||
| <level>[ignore]</level> | ||
| <levelValue>[ignore]</levelValue> | ||
| </fieldNames> | ||
| </encoder> | ||
| <appender name="CLOUD" class="com.google.cloud.logging.logback.LoggingAppender"> | ||
| <!-- Optional : filter logs at or above a level --> | ||
| <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> | ||
| <level>INFO</level> | ||
| </filter> | ||
| <log>application.log</log> <!-- Optional : default java.log --> | ||
| <resourceType>gae_app</resourceType> <!-- Optional : default: auto-detected, fallback: global --> | ||
| <enhancer>com.example.logging.logback.enhancers.ExampleEnhancer</enhancer> <!-- Optional --> | ||
| <flushLevel>WARN</flushLevel> <!-- Optional : default ERROR --> | ||
| <!-- Redirect logs to stdout in JSON format for Cloud Run to capture --> | ||
| <redirectToStdout>true</redirectToStdout> | ||
| </appender> | ||
| <root level="INFO"> | ||
| <appender-ref ref="jsonConsoleAppender"/> | ||
| <appender-ref ref="CLOUD"/> | ||
| </root> | ||
| </configuration> | ||
| <!-- [END cloudrun_manual_logging_logback] --> | ||
| <!-- [END cloudrun_manual_logging_logback] --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.