refactor: use central logger

This commit is contained in:
2024-07-07 23:45:37 +02:00
parent cf8ff410cc
commit ef108d63e1
86 changed files with 903 additions and 889 deletions

View File

@ -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