diff --git a/pkg/logging/logger.go b/pkg/logging/logger.go index d27e614..111cd96 100644 --- a/pkg/logging/logger.go +++ b/pkg/logging/logger.go @@ -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,