20 lines
257 B
Go
20 lines
257 B
Go
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...)
|
|
}
|