@@ -43,9 +43,6 @@ export class LoggerWithoutCallSite {
4343 private _mySettings : ISettingsParam = { } ;
4444 private _childLogger : Logger [ ] = [ ] ;
4545 private _maskAnyRegExp : RegExp | undefined ;
46- protected _callSiteWrapper : ( callSite : NodeJS . CallSite ) => NodeJS . CallSite = (
47- callSite : NodeJS . CallSite
48- ) => callSite ;
4946
5047 /**
5148 * @param settings - Configuration of the logger instance (all settings are optional with sane defaults)
@@ -175,7 +172,8 @@ export class LoggerWithoutCallSite {
175172
176173 this . _maskAnyRegExp =
177174 this . settings . maskAnyRegEx ?. length > 0
178- ? new RegExp ( Object . values ( this . settings . maskAnyRegEx ) . join ( "|" ) , "g" )
175+ ? // eslint-disable-next-line @rushstack/security/no-unsafe-regexp
176+ new RegExp ( Object . values ( this . settings . maskAnyRegEx ) . join ( "|" ) , "g" )
179177 : undefined ;
180178
181179 LoggerHelper . setUtilsInspectStyles (
@@ -202,10 +200,7 @@ export class LoggerWithoutCallSite {
202200 const childSettings : ISettings = {
203201 ...this . settings ,
204202 } ;
205- const childLogger : Logger = new ( this . constructor as any ) (
206- settings ,
207- childSettings
208- ) ;
203+ const childLogger : Logger = new Logger ( settings , childSettings ) ;
209204 this . _childLogger . push ( childLogger ) ;
210205 return childLogger ;
211206 }
@@ -313,6 +308,10 @@ export class LoggerWithoutCallSite {
313308 return errorObject ;
314309 }
315310
311+ protected _callSiteWrapper : ( callSite : NodeJS . CallSite ) => NodeJS . CallSite = (
312+ callSite : NodeJS . CallSite
313+ ) => callSite ;
314+
316315 private _handleLog (
317316 logLevel : TLogLevelName ,
318317 logArguments : unknown [ ] ,
0 commit comments