forked from toolshed/abra
refactor: use central logger
This commit is contained in:
@ -3,8 +3,7 @@ package internal
|
||||
import (
|
||||
"os"
|
||||
|
||||
logrusStack "github.com/Gurpartap/logrus-stack"
|
||||
"github.com/sirupsen/logrus"
|
||||
"coopcloud.tech/abra/pkg/log"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
@ -288,10 +287,8 @@ var AllServicesFlag = &cli.BoolFlag{
|
||||
// SubCommandBefore wires up pre-action machinery (e.g. --debug handling).
|
||||
func SubCommandBefore(c *cli.Context) error {
|
||||
if Debug {
|
||||
logrus.SetLevel(logrus.DebugLevel)
|
||||
logrus.SetFormatter(&logrus.TextFormatter{})
|
||||
logrus.SetOutput(os.Stderr)
|
||||
logrus.AddHook(logrusStack.StandardHook())
|
||||
log.SetLevel(log.DebugLevel)
|
||||
log.SetOutput(os.Stderr)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user