-
Notifications
You must be signed in to change notification settings - Fork 769
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
Feature: unify log level config #17286
Comments
cc @wubx |
Hi, this got me thinking about whether Perhaps we could simply extend the support for levels and pass it down to the underlying logging tools? For example: [log.file]
level = "DEBUG,databend_query=info" |
After comprehensively reviewing the code related to logging, I've discovered that our Currently, we actually support two methods for setting filters. I'm not sure if this is a good approach. Fortunately, the If we uniformly adopt the
|
I prefer changing the default level to |
It's best to keep it simple. If we already support env_logger, and this is a specification, we can just use this. changing the default level to "warn,databend_=info,openraft=info,opendal=info" |
Unified setting would be better:) |
prefix_filter
for All Logs
Current Behavior
Currently, the
prefix_filter
configuration is only supported for file logs. However, when a user enables this configuration, they likely expect it to apply to all log outputs, not just file logs.Proposed Enhancement
Introduce a global
prefix_filter
configuration that applies to all logs. The existingprefix_filter
for file logs can be retained for finer control, and it will override the globalprefix_filter
if specified. This approach ensures backward compatibility while making the configuration more intuitive.Compatibility
prefix_filter
will remain"databend_,openraft"
, maintaining existing behavior.prefix_filter
to an empty string will allow all log targets to be included.Benefits
Example
The text was updated successfully, but these errors were encountered: