package logger import ( "go.uber.org/zap/zapcore" "testing" "time" ) func TestLogger(t *testing.T) { Logger().Debugf("%s", time.Now().Format("2006-01-02 15:04:05.000")) Logger().Infof("%s", time.Now().Format("2006-01-02 15:04:05.000")) SetLevel(zapcore.InfoLevel) Logger().Debugf("%s", time.Now().Format("2006-01-02 15:04:05.000")) Logger().Infof("%s", time.Now().Format("2006-01-02 15:04:05.000")) }