Filter some logs when debugging locally
Requirements and scenarios
When I debug locally, the log I want to focus on will be mixed with the gRPC health check log, and their log levels are all info
.
Most of the time, I don't want to care about the health check log when debugging locally.
My way
I created a MR to try to solve this problem: !4168 (merged)
-
If encountering an error log, it mill be printed.
-
A new environment variable
GITALY_LOG_REQUEST_METHOD_ALLOW_PATTERN
is added to select the log of corresponding gRPC request method. -
A new environment variable
GITALY_LOG_REQUEST_METHOD_DENY_PATTERN
is added to skip the log of corresponding gRPC request method. A typical value is/grpc.health.v1.Health/Check
. -
If variables have not been set, it will not change any existing behavior.
Edited by Baodong