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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user