You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
331 B

package config
import (
"github.com/sirupsen/logrus"
"google.golang.org/grpc/grpclog"
"sonet/pkg/utils/logger"
)
func initLogger() {
logrus.SetFormatter(&logrus.TextFormatter{
ForceColors: true,
TimestampFormat: "2006-01-02 15:04:05", //时间格式
FullTimestamp: true,
})
grpclog.SetLoggerV2(logger.Logger)
}