Auth Polish 3

This commit is contained in:
Rokojori 2026-07-17 21:11:37 +02:00
parent f493783a53
commit 7eff4020f9
1 changed files with 3 additions and 1 deletions

View File

@ -11,6 +11,7 @@ export class RJLog
static readonly matcherWithFunction = /^\s+at\s(.+)\s\(.+?:(\d+:\d+)\)/; static readonly matcherWithFunction = /^\s+at\s(.+)\s\(.+?:(\d+:\d+)\)/;
static readonly matcherFile = /\(.+?\\(\w+)\.js:(\d+:\d+)\)/; static readonly matcherFile = /\(.+?\\(\w+)\.js:(\d+:\d+)\)/;
static readonly matcherAnonymous = /^\s+at\s(.+)\s\((.+)\)/; static readonly matcherAnonymous = /^\s+at\s(.+)\s\((.+)\)/;
static readonly functionMatcher = /^\s+at\s(.*?)(\w+\.(?:ts|js)):(\d+:\d+)$/;
static readonly logAlwaysLineInfo = true; static readonly logAlwaysLineInfo = true;
@ -18,6 +19,7 @@ export class RJLog
static _parseLineResult( line:string ):RegExpExecArray|null static _parseLineResult( line:string ):RegExpExecArray|null
{ {
let result = RJLog.matcherWithFunction.exec( line ) || let result = RJLog.matcherWithFunction.exec( line ) ||
RJLog.functionMatcher.exec( line ) ||
RJLog.matcherFile.exec( line ) || RJLog.matcherFile.exec( line ) ||
RJLog.matcherAnonymous.exec( line ); RJLog.matcherAnonymous.exec( line );
@ -71,7 +73,7 @@ export class RJLog
return output.join( "" ); 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 + "" ); stackTrace = stackTrace || ( new Error().stack + "" );