env和日志

master
nikkiing 2 years ago
parent 4244fbe25f
commit 2c221193af
  1. 14
      glog/v1/glog.go

@ -1,9 +1,17 @@
package glog package glog
import "github.com/go-kratos/kratos/v2/log" import (
"github.com/go-kratos/kratos/v2/log"
"sync"
)
var Glog *log.Helper var (
once sync.Once
Glog *log.Helper
)
func NewHelper(logger log.Logger) { func NewHelper(logger log.Logger) {
Glog = log.NewHelper(logger) once.Do(func() {
Glog = log.NewHelper(logger)
})
} }

Loading…
Cancel
Save