Skip to content

Commit ec385ec

Browse files
committed
Add comment to clarify order of log extensions and creating childs.
1 parent 361c636 commit ec385ec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/logger.ts

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ interface LoggerWithLogMethod extends Logger {
3333
export interface Logger extends BaseLogger {
3434
/**
3535
* Create a child logger.
36+
* This child will apply the methodFactory of the parent. So any log extensions applied to the parent
37+
* at the time of calling `getChild` will be applied to the child as well.
38+
* It will NOT apply changes to the parents methodFactory after the child was created.
39+
* Those changes will not be applied manually to the child.
3640
*
3741
* @param namespace - name to add to the current logger to generate the child. Some implementations of `Logger`
3842
* use this as a prefix; others use a different mechanism.

0 commit comments

Comments
 (0)