Files
loggerx/loggerx_test.go
T
2024-01-23 13:37:51 +08:00

26 lines
399 B
Go

package loggerx_test
import (
"context"
"testing"
"time"
"code.yun.ink/pkg/loggerx"
)
// func TestMain(m *testing.M) {
// }
func TestLogger(t *testing.T) {
l := loggerx.NewLogger(loggerx.SetErrorToInfo())
l.Error(context.Background(), "test error")
l.Channel("test").Error(context.Background(), "test error")
l.Info(context.Background(), "test info")
time.Sleep(time.Second * 2)
}