From 8b12e470d9ce2fccd825e5f902d4d5cd2519c52e Mon Sep 17 00:00:00 2001 From: Bryan Date: Wed, 16 Mar 2022 13:39:57 -0700 Subject: [PATCH] fix: CLI - Add log for daemon start (#464) While going through the manual CLI flow with some people on the team, there was some confusion with the `coder daemon` command - the fact there was no output to confirm that the daemon started: ``` coder ~/coder (bryphe/fix/daemon-log) $ dist/coder_linux_amd64/coder daemon ``` This PR just adds a simple log to confirm that the daemon has started: ``` coder ~/coder (bryphe/fix/daemon-log) $ dist/coder_linux_amd64/coder daemon 2022-03-16 17:57:20.358 [INFO] daemon started {"url": "http://127.0.0.1:3000"} ``` Just throwing this out there. Feel free to reject if you have concerns about adding this @kylecarbs ! --- cli/daemon.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/daemon.go b/cli/daemon.go index 178c918209..c0e0f32698 100644 --- a/cli/daemon.go +++ b/cli/daemon.go @@ -50,6 +50,8 @@ func daemon() *cobra.Command { } defer listener.Close() + logger.Info(cmd.Context(), "daemon started", slog.F("url", accessURL.String())) + client := codersdk.New(accessURL) daemonClose, err := newProvisionerDaemon(cmd.Context(), client, logger) if err != nil {