chore: cleanup extraneous logging (#9156)

* The batchstats warning went out on every Ctrl+C in my development

Rule of silence:

The provisioner and connect messages messages were sent out on every startup
without a corresponding user event, making them annoying and more-so
debug messages.
This commit is contained in:
Ammar Bandukwala
2023-08-17 16:01:55 -05:00
committed by GitHub
parent 9710bada06
commit be40dc85ab
5 changed files with 12 additions and 6 deletions

View File

@ -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
}

View File

@ -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{