Skip to content

Commit

Permalink
refactor(log): remove log private methods/properties underscore (deno…
Browse files Browse the repository at this point in the history
  • Loading branch information
eryue0220 authored Jan 27, 2024
1 parent 6dad760 commit aad9999
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions log/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>(
#log<T>(
level: LogLevel,
msg: (T extends GenericFunction ? never : T) | (() => T),
...args: unknown[]
Expand Down Expand Up @@ -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<T>(msg: () => T, ...args: unknown[]): T | undefined;
Expand All @@ -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. */
Expand All @@ -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<T>(msg: () => T, ...args: unknown[]): T | undefined;
Expand All @@ -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<T>(msg: () => T, ...args: unknown[]): T | undefined;
Expand All @@ -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);
}
}

0 comments on commit aad9999

Please sign in to comment.