fix: always log everything to file

This commit is contained in:
2025-01-25 13:42:32 +02:00
parent 00934e98f9
commit fa59a4006b

View File

@@ -78,6 +78,10 @@ func (l *Logger) log(level string, colorizer *color.Color, format string, args .
// Write to file
l.fileLogger.Println(message)
if level == "DEBUG" && !l.debug {
return
}
// Write to console with color
if colorizer != nil {
l.consoleOut.Println(colorizer.Sprint(message))
@@ -102,9 +106,6 @@ func Error(format string, args ...interface{}) {
}
func Debug(format string, args ...interface{}) {
if !logger.debug {
return
}
colorGreen := color.New(color.FgGreen).Add(color.Bold)
logger.log("DEBUG", colorGreen, format, args...)
}