mirror of
https://gitee.com/shikong-sk/gofiber-study
synced 2025-05-13 05:28:17 +08:00
18 lines
413 B
Go
18 lines
413 B
Go
|
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.999"))
|
||
|
Logger().Infof("%s", time.Now().Format("2006-01-02 15:04:05.999"))
|
||
|
|
||
|
SetLevel(zapcore.InfoLevel)
|
||
|
|
||
|
Logger().Debugf("%s", time.Now().Format("2006-01-02 15:04:05.999"))
|
||
|
Logger().Infof("%s", time.Now().Format("2006-01-02 15:04:05.999"))
|
||
|
}
|