2021-02-17 11:14:47 +02:00
|
|
|
package log
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
2021-03-14 09:36:00 +02:00
|
|
|
func TestStdLogger(t *testing.T) {
|
2021-02-22 11:50:43 +02:00
|
|
|
logger := DefaultLogger
|
2021-04-30 19:15:30 +02:00
|
|
|
logger = With(logger, "caller", DefaultCaller, "ts", DefaultTimestamp)
|
2021-02-17 11:14:47 +02:00
|
|
|
|
2021-08-31 04:14:57 +02:00
|
|
|
_ = logger.Log(LevelInfo, "msg", "test debug")
|
|
|
|
_ = logger.Log(LevelInfo, "msg", "test info")
|
|
|
|
_ = logger.Log(LevelInfo, "msg", "test warn")
|
|
|
|
_ = logger.Log(LevelInfo, "msg", "test error")
|
2021-10-21 11:39:33 +02:00
|
|
|
_ = logger.Log(LevelDebug, "singular")
|
|
|
|
|
|
|
|
logger2 := DefaultLogger
|
|
|
|
_ = logger2.Log(LevelDebug)
|
2021-02-17 11:14:47 +02:00
|
|
|
}
|