mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-14 02:33:03 +02:00
79497dd3a5
* log: fix global logger
17 lines
301 B
Go
17 lines
301 B
Go
package log
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
)
|
|
|
|
func TestInfo(t *testing.T) {
|
|
logger := DefaultLogger
|
|
logger = With(logger, "ts", DefaultTimestamp, "caller", DefaultCaller)
|
|
_ = logger.Log(LevelInfo, "key1", "value1")
|
|
}
|
|
|
|
func TestWithContext(t *testing.T) {
|
|
WithContext(context.Background(), nil)
|
|
}
|