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