forked from p93542168/wheat-cache
test(log) add text func
This commit is contained in:
parent
34dd0fe94f
commit
880aba64d0
|
@ -1,11 +1,26 @@
|
||||||
package logx
|
package logx
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
|
_ "gitee.com/timedb/wheatCache/conf"
|
||||||
"gitee.com/timedb/wheatCache/pkg/event"
|
"gitee.com/timedb/wheatCache/pkg/event"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStd(t *testing.T) {
|
func TestStd(t *testing.T) {
|
||||||
produce := event.NewProduce(nil)
|
Info("%d%s", 11, "Info")
|
||||||
NewLogger().With(&produce).Info(111)
|
Debug("%d%s", 11, "Debug")
|
||||||
|
Warn("%d%s", 11, "Warn")
|
||||||
|
Error("%d%s", 11, "Error")
|
||||||
|
Panic("%d%s", 11, "Panic")
|
||||||
|
|
||||||
|
logger := With(context.Background(),
|
||||||
|
event.NewProduce(event.NewDriver(100)))
|
||||||
|
|
||||||
|
logger.Info("%d%s", 11, "Info")
|
||||||
|
logger.Debug("%d%s", 11, "Debug")
|
||||||
|
logger.Warn("%d%s", 11, "Warn")
|
||||||
|
logger.Error("%d%s", 11, "Error")
|
||||||
|
logger.Panic("%d%s", 11, "Panic")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue