Skip to content

Commit 0cc656b

Browse files
committed
update doc
1 parent ad43d25 commit 0cc656b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/api/logger.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,13 @@ added: REPLACEME
240240
Creates a child logger with additional context bindings. Child loggers inherit
241241
the parent's configuration and add their own bindings to all log records.
242242

243+
> **Note for library authors:** The `level` option in `child()` is intended for
244+
> application code only. Library and module authors should NOT override the log
245+
> level in child loggers. Instead, libraries should inherit the parent logger's
246+
> level to respect the application developer's log level configuration.
247+
> Application developers can use this feature to isolate specific components
248+
> or adjust verbosity for particular subsystems they directly control.
249+
243250
```mjs
244251
import { Logger } from 'node:logger';
245252

0 commit comments

Comments
 (0)