Expand logging, and daemonless command support.

This adds more logging in certain places, and adds logging to the CLI.
It also allows for certain commands in the CLI to be used without a
daemon connection, namely `init`, which previously required the daemon
to be connected, but now does not since it doesnt need it.
This commit is contained in:
Zoe
2025-05-08 09:53:41 -05:00
parent 5bb696052a
commit c51eca5dab
16 changed files with 538 additions and 470 deletions

View File

@@ -7,12 +7,12 @@ import (
)
func StopCommand(ctx CommandCtx, args []string) error {
projectName, err := util.GetProject("stop", args, ctx.Config)
projectName, err := util.GetProject("stop", args, ctx.Config, ctx.Logger)
if err != nil {
return err
}
err = util.PutRequest(ctx.Config.DaemonURL+"/app/"+projectName.Id+"/stop", nil)
err = util.PutRequest(ctx.Config.DaemonURL+"/app/"+projectName.Id+"/stop", nil, ctx.Logger)
if err != nil {
return fmt.Errorf("failed to stop %s: %v", projectName.Name, err)
}