feat: use named loggers in coderd (#8148)

This commit is contained in:
Marcin Tojek
2023-06-22 20:09:33 +02:00
committed by GitHub
parent 1417c12229
commit 8e2422d42c
7 changed files with 63 additions and 19 deletions
@@ -506,7 +506,7 @@ func (server *Server) UpdateJob(ctx context.Context, request *proto.UpdateJobReq
err = server.Pubsub.Publish(provisionersdk.ProvisionerJobLogsNotifyChannel(parsedID), data)
if err != nil {
server.Logger.Error(ctx, "failed to publish job logs", slog.F("job_id", parsedID), slog.Error(err))
return nil, xerrors.Errorf("publish job log: %w", err)
return nil, xerrors.Errorf("publish job logs: %w", err)
}
server.Logger.Debug(ctx, "published job logs", slog.F("job_id", parsedID))
}