step011: run command
This commit is contained in:
19
internal/log/log.go
Normal file
19
internal/log/log.go
Normal file
@ -0,0 +1,19 @@
|
||||
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...)
|
||||
}
|
Reference in New Issue
Block a user