Skip to content

Commit

Permalink
fix(getchildlogger): properly returns child logger instance
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Nov 24, 2020
1 parent 8658ae4 commit e9a39c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/LoggerWithoutCallSite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ export class LoggerWithoutCallSite {
const childSettings: ISettings = {
...this.settings,
};
const childLogger: Logger = new Logger(settings, childSettings);
//eslint-disable-next-line @typescript-eslint/no-explicit-any
const childLogger: Logger = new (this.constructor as any)(
settings,
childSettings
);
this._childLogger.push(childLogger);
return childLogger;
}
Expand Down

0 comments on commit e9a39c1

Please sign in to comment.