Skip to content

Commit

Permalink
Merge pull request #68 from kwonoj/fix-child-logger
Browse files Browse the repository at this point in the history
fix(getchildlogger): properly returns child logger instance
  • Loading branch information
terehov authored Nov 25, 2020
2 parents 09f7a52 + e9a39c1 commit ab2be4f
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 ab2be4f

Please sign in to comment.