fix: 两个 With 改在 Core 上执行
This commit is contained in:
parent
1c666637cd
commit
c8e9f1d0fd
@ -95,11 +95,12 @@ func Default() *Logger { return std }
|
|||||||
func ReplaceDefault(l *Logger) { std = l }
|
func ReplaceDefault(l *Logger) { std = l }
|
||||||
|
|
||||||
func SetLevel(level Level) { std.SetLevel(level) }
|
func SetLevel(level Level) { std.SetLevel(level) }
|
||||||
|
|
||||||
func With(fields ...Field) {
|
func With(fields ...Field) {
|
||||||
std.l.With(fields...)
|
std.l.Core().With(fields)
|
||||||
}
|
}
|
||||||
func WithRequestId(reqId string) {
|
func WithRequestId(reqId string) {
|
||||||
std.l.With(String("reqId", reqId))
|
std.l.Core().With([]Field{String("reqId", reqId)})
|
||||||
}
|
}
|
||||||
|
|
||||||
func Debug(msg string, fields ...Field) { std.Debug(msg, fields...) }
|
func Debug(msg string, fields ...Field) { std.Debug(msg, fields...) }
|
||||||
|
Loading…
Reference in New Issue
Block a user