Move slogd-colored to other repository
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s

- Cleanup dependency imports

Signed-off-by: Jan Tytgat <jan.tytgat@corelayer.eu>
This commit is contained in:
Jan Tytgat
2025-04-16 21:11:54 +02:00
parent bdd87d8b59
commit 26059ea3e9
4 changed files with 2 additions and 136 deletions

View File

@ -11,8 +11,6 @@ import (
"github.com/spf13/pflag"
"git.flexabyte.io/flexabyte/go-slogd/pkg/slogd"
"git.flexabyte.io/flexabyte/go-kit/pkg/slogd_colored"
)
var (
@ -39,7 +37,8 @@ func normalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName {
func persistentPreRunFuncE(cmd *cobra.Command, args []string) error {
slogd.SetLevel(slogd.Level(logLevelFlag))
if slogd.ActiveHandler() == slogd_colored.HandlerColor && noColorFlag {
// if slogd.ActiveHandler() == slogd_colored.HandlerColor && noColorFlag {
if slogd.ActiveHandler() != slogd.HandlerJSON && noColorFlag {
slogd.UseHandler(slogd.HandlerText)
cmd.SetContext(slogd.WithContext(cmd.Context()))
}