|
|
|
@ -3,7 +3,7 @@ package log
|
|
|
|
|
import ( |
|
|
|
|
"context" |
|
|
|
|
"errors" |
|
|
|
|
"git.gz.internal.jumaiyx.cn/jm/jmproto/conf" |
|
|
|
|
"git.gz.internal.jumaiyx.cn/pkg/config/v2/cproto" |
|
|
|
|
"git.gz.internal.jumaiyx.cn/pkg/log/klog" |
|
|
|
|
"testing" |
|
|
|
|
"time" |
|
|
|
@ -17,16 +17,16 @@ func TestNewKLogger(t *testing.T) {
|
|
|
|
|
ctx := context.Background() |
|
|
|
|
//ctx = context.WithValue(ctx, "reqId", "dadadada")
|
|
|
|
|
|
|
|
|
|
l := NewLogger(&conf.Log{ |
|
|
|
|
l := NewLogger(&cproto.Log{ |
|
|
|
|
Level: LevelDebug, |
|
|
|
|
Kafka: &conf.Kafka{ |
|
|
|
|
Addr: []string{"123.207.103.194:9094", "106.55.69.140:9094", "42.194.191.63:9094"}, |
|
|
|
|
//Addr: []string{"175.178.113.184:31090"},
|
|
|
|
|
Topic: "log-information-record-dev", |
|
|
|
|
Group: "log-information-record-dev", |
|
|
|
|
Username: "user", |
|
|
|
|
Password: "Rkyf1Ue9jUI0", |
|
|
|
|
}, |
|
|
|
|
//Kafka: &conf.Kafka{
|
|
|
|
|
// Addr: []string{"123.207.103.194:9094", "106.55.69.140:9094", "42.194.191.63:9094"},
|
|
|
|
|
// //Addr: []string{"175.178.113.184:31090"},
|
|
|
|
|
// Topic: "log-information-record-dev",
|
|
|
|
|
// Group: "log-information-record-dev",
|
|
|
|
|
// Username: "user",
|
|
|
|
|
// Password: "Rkyf1Ue9jUI0",
|
|
|
|
|
//},
|
|
|
|
|
}) |
|
|
|
|
//l := DefaultLogger()
|
|
|
|
|
l.WithContext(ctx) |
|
|
|
|