fix: use silent logger in TUI mode to prevent console conflicts

This commit is contained in:
2025-11-05 13:21:16 +00:00
parent 161f577c3a
commit b6d56daf07
14 changed files with 20 additions and 4 deletions

View File

@ -78,6 +78,20 @@ func New(level, format string) Logger {
}
}
// NewSilent creates a logger that discards all output (for TUI mode)
func NewSilent() Logger {
l := logrus.New()
l.SetLevel(logrus.InfoLevel)
l.SetOutput(io.Discard) // Discard all log output
l.SetFormatter(&CleanFormatter{})
return &logger{
logrus: l,
level: logrus.InfoLevel,
format: "text",
}
}
func (l *logger) Debug(msg string, args ...any) {
l.logWithFields(logrus.DebugLevel, msg, args...)
}