diff --git a/log/log.go b/log/log.go index 5f486fe..86ecf43 100644 --- a/log/log.go +++ b/log/log.go @@ -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, } }