forked from toolshed/abra
refactor: use central logger
This commit is contained in:
@ -7,8 +7,8 @@ import (
|
||||
"coopcloud.tech/abra/pkg/config"
|
||||
"coopcloud.tech/abra/pkg/context"
|
||||
"coopcloud.tech/abra/pkg/formatter"
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"github.com/docker/cli/cli/connhelper/ssh"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
@ -35,7 +35,7 @@ var serverListCommand = cli.Command{
|
||||
dockerContextStore := context.NewDefaultDockerContextStore()
|
||||
contexts, err := dockerContextStore.Store.List()
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
tableColumns := []string{"name", "host", "user", "port"}
|
||||
@ -43,7 +43,7 @@ var serverListCommand = cli.Command{
|
||||
|
||||
serverNames, err := config.ReadServerNames()
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
for _, serverName := range serverNames {
|
||||
@ -58,7 +58,7 @@ var serverListCommand = cli.Command{
|
||||
if ctx.Name == serverName {
|
||||
sp, err := ssh.ParseURL(endpoint)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if sp.Host == "" {
|
||||
@ -99,7 +99,7 @@ var serverListCommand = cli.Command{
|
||||
table.JSONRender()
|
||||
} else {
|
||||
if problemsFilter && table.NumLines() == 0 {
|
||||
logrus.Info("all servers wired up correctly 👏")
|
||||
log.Info("all servers wired up correctly 👏")
|
||||
} else {
|
||||
table.Render()
|
||||
}
|
||||
|
Reference in New Issue
Block a user