upod/internal/log/log.go

20 lines
257 B
Go
Raw Normal View History

2024-03-20 19:14:31 -07:00
package log
import (
"os"
"github.com/sirupsen/logrus"
"github.com/spf13/cast"
)
func init() {
if cast.ToBool(os.Getenv("UPOD_DEBUG")) {
logrus.SetLevel(logrus.DebugLevel)
}
}
func Debug(msg string, args ...any) {
logrus.Debugf(msg, args...)
}