Skip to content

chore: cleanup extraneous logging #9156

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 1 commit into from
Aug 17, 2023
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
2 changes: 1 addition & 1 deletion cli/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ func newProvisionerDaemon(
// in provisionerdserver.go to learn more!
return coderAPI.CreateInMemoryProvisionerDaemon(ctx, debounce)
}, &provisionerd.Options{
Logger: logger,
Logger: logger.Named("provisionerd"),
JobPollInterval: cfg.Provisioner.DaemonPollInterval.Value(),
JobPollJitter: cfg.Provisioner.DaemonPollJitter.Value(),
JobPollDebounce: debounce,
Expand Down
2 changes: 1 addition & 1 deletion coderd/batchstats/batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (b *Batcher) run(ctx context.Context) {
// If the flush lever is depressed, flush the buffer immediately.
b.flush(authCtx, true, "reaching capacity")
case <-ctx.Done():
b.log.Warn(ctx, "context done, flushing before exit")
b.log.Debug(ctx, "context done, flushing before exit")
b.flush(authCtx, true, "exit")
return
}
Expand Down
8 changes: 7 additions & 1 deletion coderd/workspaceagents.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,13 @@ func (api *API) postWorkspaceAgentStartup(rw http.ResponseWriter, r *http.Reques
return
}

api.Logger.Info(ctx, "post workspace agent version", slog.F("agent_id", apiAgent.ID), slog.F("agent_version", req.Version))
api.Logger.Debug(
ctx,
"post workspace agent version",
slog.F("agent_id", apiAgent.ID),
slog.F("agent_version", req.Version),
slog.F("remote_addr", r.RemoteAddr),
)

if !semver.IsValid(req.Version) {
httpapi.Write(ctx, rw, http.StatusBadRequest, codersdk.Response{
Expand Down
4 changes: 2 additions & 2 deletions docs/admin/provisioners.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ for deploying the Coder server.
--values provisioner-values.yaml
```

You can verify that your provisioner daemons have successfully connected to Coderd by looking for a log with message
`provisionerd successfully connected to coderd` from each Pod.
You can verify that your provisioner daemons have successfully connected to Coderd by looking for a debug log message that says
`provisionerd: successfully connected to coderd` from each Pod.

## Example: Running an external provisioner on a VM

Expand Down
2 changes: 1 addition & 1 deletion provisionerd/provisionerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (p *Server) connect(ctx context.Context) {
p.clientValue.Store(ptr.Ref(client))
p.mutex.Unlock()

p.opts.Logger.Info(ctx, "provisionerd successfully connected to coderd")
p.opts.Logger.Debug(ctx, "successfully connected to coderd")
break
}
select {
Expand Down