feat: driver manage api

This commit is contained in:
Noah Hsu
2022-06-26 20:25:02 +08:00
parent 3349982312
commit b98cd915a4
5 changed files with 44 additions and 0 deletions

View File

@ -17,6 +17,7 @@ func init() {
TimestampFormat: "2006-01-02 15:04:05",
FullTimestamp: true,
})
logrus.SetLevel(logrus.DebugLevel)
}
func Log() {
@ -24,6 +25,9 @@ func Log() {
if args.Debug || args.Dev {
logrus.SetLevel(logrus.DebugLevel)
logrus.SetReportCaller(true)
} else {
logrus.SetLevel(logrus.InfoLevel)
logrus.SetReportCaller(false)
}
logConfig := conf.Conf.Log
if logConfig.Enable {