branch-4.0: [bugfix](k8s) fix log output for K8S environment in cloud and add unit tests #60490#60678
Merged
yiguolei merged 1 commit intobranch-4.0from Feb 13, 2026
Merged
Conversation
…t tests (#60490) K8S uses stdout to capture logs. When service crashes, it tries to output crash stack to .out file. Previously, it could not output to .out file correctly. This patch standardizes the log output behavior for both BE and Cloud components: 1. --daemon mode: output logs to .info file and crash stack to .out file 2. --console mode: 2.1 enable_file_logger = true: output all logs to console (stdout) and to .info file, crash stack to .out file 2.2 enable_file_logger = false: output all logs to console (stdout) and crash stack to .out file Changes: - Implement StdoutLogSink for custom log format output to stdout in K8S - Modify console mode redirection in start scripts to separate stdout/stderr - Add shutdown_logging() function to properly clean up LogSink resources - Add shutdown_logging() calls in main() functions for graceful shutdown - Add comprehensive unit tests for both Cloud and BE components This ensures crash stack is always saved to .out file for debugging, while normal logs can be captured by K8S logging infrastructure.
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
yiguolei
approved these changes
Feb 13, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Cherry-picked from #60490