chore: refactor (#2764)
This commit is contained in:
@@ -269,10 +269,12 @@ func combineGlobalFields(fields []LogField) []LogField {
|
|||||||
return fields
|
return fields
|
||||||
}
|
}
|
||||||
|
|
||||||
originLogFields := globals.([]LogField)
|
gf := globals.([]LogField)
|
||||||
logFields := append(make([]LogField, 0, len(originLogFields)+len(fields)), originLogFields...)
|
ret := make([]LogField, 0, len(gf)+len(fields))
|
||||||
|
ret = append(ret, gf...)
|
||||||
|
ret = append(ret, fields...)
|
||||||
|
|
||||||
return append(logFields, fields...)
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
func output(writer io.Writer, level string, val interface{}, fields ...LogField) {
|
func output(writer io.Writer, level string, val interface{}, fields ...LogField) {
|
||||||
|
|||||||
Reference in New Issue
Block a user