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) }