fix nil in logger
This commit is contained in:
parent
b309a62d27
commit
0e37e72743
|
@ -94,11 +94,16 @@ func (l *Log) SetPrinter(printer func(level uint32, component string, msg string
|
|||
l.printer = printer
|
||||
}
|
||||
|
||||
func (l *Log) SetName(name string) {
|
||||
l.component = name
|
||||
}
|
||||
|
||||
func (l *Log) WithName(name string) *Log {
|
||||
return &Log{
|
||||
component: name,
|
||||
level: l.level,
|
||||
fmtTime: l.fmtTime,
|
||||
printer: l.printer,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue