Skip to content

cleanup logging #514

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
merged 2 commits into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/epp/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ type healthServer struct {

func (s *healthServer) Check(ctx context.Context, in *healthPb.HealthCheckRequest) (*healthPb.HealthCheckResponse, error) {
if !s.datastore.PoolHasSynced() {
s.logger.V(logutil.VERBOSE).Info("gRPC health check not serving", "service", in.Service)
s.logger.V(logutil.DEFAULT).Info("gRPC health check not serving", "service", in.Service)
return &healthPb.HealthCheckResponse{Status: healthPb.HealthCheckResponse_NOT_SERVING}, nil
}
s.logger.V(logutil.VERBOSE).Info("gRPC health check serving", "service", in.Service)
s.logger.V(logutil.TRACE).Info("gRPC health check serving", "service", in.Service)
return &healthPb.HealthCheckResponse{Status: healthPb.HealthCheckResponse_SERVING}, nil
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/epp/handlers/streamingserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ func (s *StreamingServer) Process(srv extProcPb.ExternalProcessor_ProcessServer)
loggerVerbose.Info("got response headers", "headers", v.ResponseHeaders.Headers.GetHeaders())
for _, header := range v.ResponseHeaders.Headers.GetHeaders() {
value := string(header.RawValue)
logger.Error(nil, "header", "key", header.Key, "value", value)

logger.V(logutil.TRACE).Info("header", "key", header.Key, "value", value)
if header.Key == "status" && value != "200" {
reqCtx.ResponseStatusCode = errutil.ModelServerError
} else if header.Key == "content-type" && strings.Contains(value, "text/event-stream") {
Expand Down