Auth Polish 3
This commit is contained in:
parent
f493783a53
commit
7eff4020f9
|
|
@ -11,6 +11,7 @@ export class RJLog
|
|||
static readonly matcherWithFunction = /^\s+at\s(.+)\s\(.+?:(\d+:\d+)\)/;
|
||||
static readonly matcherFile = /\(.+?\\(\w+)\.js:(\d+:\d+)\)/;
|
||||
static readonly matcherAnonymous = /^\s+at\s(.+)\s\((.+)\)/;
|
||||
static readonly functionMatcher = /^\s+at\s(.*?)(\w+\.(?:ts|js)):(\d+:\d+)$/;
|
||||
|
||||
static readonly logAlwaysLineInfo = true;
|
||||
|
||||
|
|
@ -18,6 +19,7 @@ export class RJLog
|
|||
static _parseLineResult( line:string ):RegExpExecArray|null
|
||||
{
|
||||
let result = RJLog.matcherWithFunction.exec( line ) ||
|
||||
RJLog.functionMatcher.exec( line ) ||
|
||||
RJLog.matcherFile.exec( line ) ||
|
||||
RJLog.matcherAnonymous.exec( line );
|
||||
|
||||
|
|
@ -71,7 +73,7 @@ export class RJLog
|
|||
return output.join( "" );
|
||||
}
|
||||
|
||||
static getLineInfo( color:string = RJLog.logColor, stackTrace?:string, lineIndex:number = 2 )
|
||||
static getLineInfo( color:string = RJLog.logColor, stackTrace?:string, lineIndex:number = 3 )
|
||||
{
|
||||
stackTrace = stackTrace || ( new Error().stack + "" );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue