forked from toolshed/abra
refactor: use central logger
This commit is contained in:
@ -10,9 +10,9 @@ import (
|
||||
appPkg "coopcloud.tech/abra/pkg/app"
|
||||
"coopcloud.tech/abra/pkg/config"
|
||||
"coopcloud.tech/abra/pkg/formatter"
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"github.com/AlecAivazis/survey/v2"
|
||||
dockerClient "github.com/docker/docker/client"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// NewVersionOverview shows an upgrade or downgrade overview
|
||||
@ -37,7 +37,7 @@ func NewVersionOverview(app appPkg.App, currentVersion, newVersion, releaseNotes
|
||||
fmt.Println()
|
||||
fmt.Print(releaseNotes)
|
||||
} else {
|
||||
logrus.Warnf("no release notes available for %s", newVersion)
|
||||
log.Warnf("no release notes available for %s", newVersion)
|
||||
}
|
||||
|
||||
if NoInput {
|
||||
@ -54,7 +54,7 @@ func NewVersionOverview(app appPkg.App, currentVersion, newVersion, releaseNotes
|
||||
}
|
||||
|
||||
if !response {
|
||||
logrus.Fatal("exiting as requested")
|
||||
log.Fatal("exiting as requested")
|
||||
}
|
||||
|
||||
return nil
|
||||
@ -103,7 +103,7 @@ func PostCmds(cl *dockerClient.Client, app appPkg.App, commands string) error {
|
||||
if len(commandParts) > 2 {
|
||||
parsedCmdArgs = fmt.Sprintf("%s ", strings.Join(commandParts[2:], " "))
|
||||
}
|
||||
logrus.Infof("running post-command '%s %s' in container %s", cmdName, parsedCmdArgs, targetServiceName)
|
||||
log.Infof("running post-command '%s %s' in container %s", cmdName, parsedCmdArgs, targetServiceName)
|
||||
|
||||
if err := EnsureCommand(abraSh, app.Recipe, cmdName); err != nil {
|
||||
return err
|
||||
@ -125,7 +125,7 @@ func PostCmds(cl *dockerClient.Client, app appPkg.App, commands string) error {
|
||||
return fmt.Errorf(fmt.Sprintf("no service %s for %s?", targetServiceName, app.Name))
|
||||
}
|
||||
|
||||
logrus.Debugf("running command %s %s within the context of %s_%s", cmdName, parsedCmdArgs, app.StackName(), targetServiceName)
|
||||
log.Debugf("running command %s %s within the context of %s_%s", cmdName, parsedCmdArgs, app.StackName(), targetServiceName)
|
||||
|
||||
Tty = true
|
||||
if err := RunCmdRemote(cl, app, abraSh, targetServiceName, cmdName, parsedCmdArgs); err != nil {
|
||||
@ -167,7 +167,7 @@ func DeployOverview(app appPkg.App, version, message string) error {
|
||||
}
|
||||
|
||||
if !response {
|
||||
logrus.Fatal("exiting as requested")
|
||||
log.Fatal("exiting as requested")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user