From aad99992653b45d9bd09ccba1f645accb22f5cf4 Mon Sep 17 00:00:00 2001 From: cin Date: Sun, 28 Jan 2024 00:28:51 +0800 Subject: [PATCH] refactor(log): remove log private methods/properties underscore (#4243) --- log/logger.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/log/logger.ts b/log/logger.ts index b6abe61db58d..4ce2c3614fc1 100644 --- a/log/logger.ts +++ b/log/logger.ts @@ -107,7 +107,7 @@ export class Logger { * function, not the function itself, unless the function isn't called, in which * case undefined is returned. All types are coerced to strings for logging. */ - #_log( + #log( level: LogLevel, msg: (T extends GenericFunction ? never : T) | (() => T), ...args: unknown[] @@ -169,7 +169,7 @@ export class Logger { msg: (T extends GenericFunction ? never : T) | (() => T), ...args: unknown[] ): T | undefined { - return this.#_log(LogLevels.DEBUG, msg, ...args); + return this.#log(LogLevels.DEBUG, msg, ...args); } info(msg: () => T, ...args: unknown[]): T | undefined; @@ -178,7 +178,7 @@ export class Logger { msg: (T extends GenericFunction ? never : T) | (() => T), ...args: unknown[] ): T | undefined { - return this.#_log(LogLevels.INFO, msg, ...args); + return this.#log(LogLevels.INFO, msg, ...args); } /** @deprecated (will be removed after 0.214.0) Use {@linkcode warn} instead. */ @@ -198,7 +198,7 @@ export class Logger { msg: (T extends GenericFunction ? never : T) | (() => T), ...args: unknown[] ): T | undefined { - return this.#_log(LogLevels.WARNING, msg, ...args); + return this.#log(LogLevels.WARNING, msg, ...args); } error(msg: () => T, ...args: unknown[]): T | undefined; @@ -207,7 +207,7 @@ export class Logger { msg: (T extends GenericFunction ? never : T) | (() => T), ...args: unknown[] ): T | undefined { - return this.#_log(LogLevels.ERROR, msg, ...args); + return this.#log(LogLevels.ERROR, msg, ...args); } critical(msg: () => T, ...args: unknown[]): T | undefined; @@ -219,6 +219,6 @@ export class Logger { msg: (T extends GenericFunction ? never : T) | (() => T), ...args: unknown[] ): T | undefined { - return this.#_log(LogLevels.CRITICAL, msg, ...args); + return this.#log(LogLevels.CRITICAL, msg, ...args); } }