-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[opt](log) refine the cloud logger #39488
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
Followup #35679 and #24556 # Background Previously, the cloud logs were written to files. The main cloud logs include meta_service.INFO and meta_service.WARNING, doris_cloud.out. In a K8s deployment environment, logs usually must be output to standard output, and other components process the log stream. # Solution This PR made the following changes: Modified the glog config: - When started with --daemon, logs are still written to various files, and the format remains unchanged. - When started with --console, meta_service.INFO's log is output to standard output and marked with the prefix RuntimeLogger. Examples are as follows: ``` RuntimeLogger I20240605 23:41:20.426553 4137369 runtime_query_statistics_mgr.cpp:245] Report profile thread stopped ``` Added a new cloud config: `enable_file_logger`, which defaults to true. This indicates that logs will be recorded in files regardless of the startup method. For example, if it is started with `--console`, the log will be output to both the file and the standard output. If it is false, the log will not be recorded in the file regardless of the startup method.
Followup #35679 and #24556
Background
Previously, the cloud logs were written to files. The main cloud logs include meta_service.INFO and meta_service.WARNING, doris_cloud.out.
In a K8s deployment environment, logs usually must be output to standard output, and other components process the log stream.
Solution
This PR made the following changes:
Modified the glog config:
When started with --daemon, logs are still written to various files, and the format remains unchanged.
When started with --console, meta_service.INFO's log is output to standard output and marked with the prefix RuntimeLogger.
Examples are as follows:
Added a new cloud config:
enable_file_logger
, which defaults to true. This indicates that logs will be recorded in files regardless of the startup method. For example, if it is started with--console
, the log will be output to both the file and the standard output. If it is false, the log will not be recorded in the file regardless of the startup method.