Skip to content

Commit

Permalink
Update pretty-logs.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
imabutahersiddik authored Oct 28, 2024
1 parent 1f814ec commit 57f89cb
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/pretty-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export class PrettyLogs {
this.fatal = this.fatal.bind(this);
this.debug = this.debug.bind(this);
this.verbose = this.verbose.bind(this);
this.trace = this.trace.bind(this);
}
public fatal(message: string, metadata?: Metadata | string | unknown) {
this._logWithStack(LOG_LEVEL.FATAL, message, metadata);
Expand All @@ -34,10 +33,6 @@ export class PrettyLogs {
public verbose(message: string, metadata?: Metadata | string) {
this._logWithStack(LOG_LEVEL.VERBOSE, message, metadata);
}

public trace(message: string, metadata?: Metadata | string) {
this._logWithStack(LOG_LEVEL.TRACE, message, metadata);
}

private _logWithStack(type: LogLevelWithOk, message: string, metaData?: Metadata | string | unknown) {
this._log(type, message);
Expand Down Expand Up @@ -107,8 +102,7 @@ export class PrettyLogs {
error: "⚠",
info: "›",
debug: "››",
verbose: "💬",
trace: "🔍",
verbose: "💬"
};

const symbol = defaultSymbols[type];
Expand All @@ -133,8 +127,7 @@ export class PrettyLogs {
error: ["warn", COLORS.fgYellow],
info: ["info", COLORS.dim],
debug: ["debug", COLORS.fgMagenta],
verbose: ["verbose", COLORS.dim],
trace: ["trace", COLORS.fgBlue],
verbose: ["verbose", COLORS.dim]
};

const _console = console[colorMap[type][0] as keyof typeof console] as (...args: string[]) => void;
Expand Down

0 comments on commit 57f89cb

Please sign in to comment.