Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(log): remove log private methods/properties underscore #4243

Merged
merged 2 commits into from
Jan 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}
Loading