From eb275c96694ee7fe96a9be61d22cac4d1fab2e65 Mon Sep 17 00:00:00 2001 From: Rokojori Date: Fri, 17 Jul 2026 21:21:53 +0200 Subject: [PATCH] Update Logger 7 --- source/server/debug/RJLog.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source/server/debug/RJLog.ts b/source/server/debug/RJLog.ts index bef1ded..d03c384 100644 --- a/source/server/debug/RJLog.ts +++ b/source/server/debug/RJLog.ts @@ -73,6 +73,13 @@ export class RJLog return output.join( "" ); } + static getDateInfo() + { + const d = new Date(); + const pad = ( n: number ) => String( n ).padStart( 2, '0' ); + return `${ d.getFullYear() }-${ pad( d.getDate() ) }-${ pad( d.getMonth() + 1 ) } ${ pad( d.getHours() ) }:${ pad( d.getMinutes() ) } +${ d.getSeconds() }s`; + } + static getLineInfo( color:string = RJLog.logColor, stackTrace?:string, lineIndex:number = 3 ) { stackTrace = stackTrace || ( new Error().stack + "" ); @@ -98,7 +105,10 @@ export class RJLog return color + " " + RJLog.resetColor ; } - return color + " " + result[ 1 ] + "(" + result[ 2 ] + ") " + RJLog.resetColor; + + let ti + + return color + " " + result[ 1 ] + "(" + result[ 2 ] + ") " + RJLog.getDateInfo() + RJLog.resetColor; }