From 0aea8e74645964233eb24900539640730ae0a583 Mon Sep 17 00:00:00 2001 From: powermaker450 Date: Wed, 21 Aug 2024 11:32:30 -0400 Subject: [PATCH] Make text optional in logger --- src/utils/logger.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/logger.ts b/src/utils/logger.ts index ef88289..57b08db 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -12,19 +12,19 @@ export class Logger { this._main = chalk.bold.gray(`[SRS | ${emp(origin ?? "Anonymous")}] `); } - public log(text: any, args?: any): void { + public log(text?: any, args?: any): void { args ? console.log(this._main + text, args) : console.log(this._main + text); } - public warn(text: any, args?: any): void { + public warn(text?: any, args?: any): void { args ? console.warn(this._main + this._wrn + text, args) : console.warn(this._main + this._wrn + text); } - public error(text: any, args?: any): void { + public error(text?: any, args?: any): void { args ? console.error(this._main + this._err + text, args) : console.error(this._main + this._err + text);