chore: reduce log volume on server startup (#16608)

Addresses https://github.com/coder/coder/issues/16231.

This PR reduces the volume of logs we print after server startup in
order to surface the web UI URL better.

Here are the logs after the changes a couple of seconds after starting
the server:

<img width="868" alt="Screenshot 2025-02-18 at 16 31 32"
src="https://github.com/user-attachments/assets/786dc4b8-7383-48c8-a5c3-a997c01ca915"
/>

The warning is due to running a development site-less build. It wouldn't
show in a release build.
This commit is contained in:
Hugo Dutka
2025-02-20 16:33:14 +01:00
committed by GitHub
parent 54b09d9878
commit 44499315ed
12 changed files with 207 additions and 61 deletions
+2 -2
View File
@@ -1370,7 +1370,7 @@ func (c *Controller) Run(ctx context.Context) {
c.logger.Error(c.ctx, "failed to dial tailnet v2+ API", errF)
continue
}
c.logger.Info(c.ctx, "obtained tailnet API v2+ client")
c.logger.Debug(c.ctx, "obtained tailnet API v2+ client")
err = c.precheckClientsAndControllers(tailnetClients)
if err != nil {
c.logger.Critical(c.ctx, "failed precheck", slog.Error(err))
@@ -1379,7 +1379,7 @@ func (c *Controller) Run(ctx context.Context) {
}
retrier.Reset()
c.runControllersOnce(tailnetClients)
c.logger.Info(c.ctx, "tailnet API v2+ connection lost")
c.logger.Debug(c.ctx, "tailnet API v2+ connection lost")
}
}()
}