trying to fix tests
This commit is contained in:
parent
6b4d4ea29f
commit
db66687f48
3 changed files with 159 additions and 64 deletions
|
|
@ -176,12 +176,14 @@ export class Logger {
|
|||
message: String(error)
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Create child logger with additional context
|
||||
*/
|
||||
child(context: LogContext): Logger {
|
||||
return new Logger((this.pino.bindings() as any).service, { ...this.context, ...context });
|
||||
const childLogger = new Logger((this.pino.bindings() as any).service, { ...this.context, ...context });
|
||||
// Use the pino child logger to properly propagate context
|
||||
childLogger.pino = this.pino.child(context);
|
||||
return childLogger;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue