Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8b12e47

Browse files
authored
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.go:53> 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 !
1 parent 810b2d2 commit 8b12e47

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cli/daemon.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ func daemon() *cobra.Command {
5050
}
5151
defer listener.Close()
5252

53+
logger.Info(cmd.Context(), "daemon started", slog.F("url", accessURL.String()))
54+
5355
client := codersdk.New(accessURL)
5456
daemonClose, err := newProvisionerDaemon(cmd.Context(), client, logger)
5557
if err != nil {

0 commit comments

Comments
 (0)