ax(logging): replace prose comment on WithComponent with usage example
Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
fbe40d2c53
commit
5bfffbdec9
1 changed files with 3 additions and 1 deletions
|
|
@ -77,7 +77,9 @@ func New(cfg Config) *Logger {
|
|||
}
|
||||
}
|
||||
|
||||
// WithComponent returns a new Logger with the specified component name.
|
||||
// WithComponent returns a child logger scoped to a sub-system.
|
||||
// child := logger.WithComponent("xmrig")
|
||||
// child.Info("miner started")
|
||||
func (l *Logger) WithComponent(component string) *Logger {
|
||||
return &Logger{
|
||||
output: l.output,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue