Skip to content

Commit

Permalink
chore: drop some log messages to trace
Browse files Browse the repository at this point in the history
This drops the level of some of the most noisy / less informative
debug messages to trace.
  • Loading branch information
stuartwdouglas committed Dec 18, 2024
1 parent b9f8209 commit 1e25b2b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion backend/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ func (s *Service) watchModuleChanges(ctx context.Context, sendChange func(respon
return err
}
}
logger.Debugf("Seeded %d deployments", initialCount)
logger.Tracef("Seeded %d deployments", initialCount)

for {
select {
Expand Down
2 changes: 1 addition & 1 deletion backend/provisioner/runner_scaling_provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func provisionRunner(scaling scaling.RunnerScaling) InMemResourceProvisionerFn {
if err == nil {
break
}
logger.Debugf("waiting for runner to be ready: %v", err)
logger.Tracef("waiting for runner to be ready: %v", err)
select {
case <-ctx.Done():
return nil, fmt.Errorf("context cancelled %w", ctx.Err())
Expand Down
2 changes: 1 addition & 1 deletion internal/rpc/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func requestKeyFromContextValue(value any) (optional.Option[model.RequestKey], e
func DefaultClientOptions(level log.Level) []connect.ClientOption {
interceptors := []connect.Interceptor{
PanicInterceptor(),
MetadataInterceptor(log.Debug),
MetadataInterceptor(log.Trace),
connectOtelInterceptor(),
CustomOtelInterceptor(),
}
Expand Down
6 changes: 3 additions & 3 deletions internal/rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func RetryStreamingServerStream[Req, Resp any](
handler func(ctx context.Context, resp *Resp) error,
errorRetryCallback func(err error) bool,
) {
logLevel := log.Debug
logLevel := log.Trace
errored := false
logger := log.FromContext(ctx)
for {
Expand All @@ -298,7 +298,7 @@ func RetryStreamingServerStream[Req, Resp any](
break
}
if errored {
logger.Debugf("Server stream recovered")
logger.Tracef("Server stream recovered")
errored = false
}
select {
Expand Down Expand Up @@ -351,7 +351,7 @@ func RetryStreamingServerStream[Req, Resp any](
// logLevelForError indicates the log.Level to use for the specified error
func logLevelForError(err error) log.Level {
if err != nil && errors.Is(err, syscall.ECONNREFUSED) {
return log.Debug
return log.Trace
}
return log.Warn
}
2 changes: 1 addition & 1 deletion internal/schema/schemaeventsource/schemaeventsource.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func New(ctx context.Context, client ftlv1connect.SchemaServiceClient) EventSour
out.Publish(event)

case ftlv1.DeploymentChangeType_DEPLOYMENT_CHANGE_TYPE_ADDED, ftlv1.DeploymentChangeType_DEPLOYMENT_CHANGE_TYPE_CHANGED:
logger.Debugf("Module %s upserted", sch.Name)
logger.Tracef("Module %s upserted", sch.Name)
event := EventUpsert{
Deployment: someDeploymentKey,
Module: sch,
Expand Down
1 change: 0 additions & 1 deletion jvm-runtime/plugin/common/jvmcommon.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ func New(scaffoldFiles *zip.Reader) *Service {
}

func (s *Service) Ping(ctx context.Context, req *connect.Request[ftlv1.PingRequest]) (*connect.Response[ftlv1.PingResponse], error) {
log.FromContext(ctx).Debugf("Received Ping")
return connect.NewResponse(&ftlv1.PingResponse{}), nil
}

Expand Down

0 comments on commit 1e25b2b

Please sign in to comment.