Skip to content

Commit

Permalink
fix log this context
Browse files Browse the repository at this point in the history
  • Loading branch information
jifalops committed Nov 18, 2024
1 parent 9aa5c58 commit e83f0da
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lib/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ export class Log {
setLevel(level: number) {
this.level = level;
if (level >= Log.ASSERT) this.assert = console.assert.bind(console);
else this.assert = function () {};
else this.assert = () => {};
if (level >= Log.ERROR) this.error = console.error.bind(console);
else this.error = function () {};
else this.error = () => {};
if (level >= Log.WARN) this.warn = console.warn.bind(console);
else this.warn = function () {};
else this.warn = () => {};
if (level >= Log.INFO) this.info = console.info.bind(console);
else this.info = function () {};
else this.info = () => {};
if (level >= Log.DEBUG) this.debug = console.debug.bind(console);
else this.debug = function () {};
else this.debug = () => {};
if (level >= Log.TRACE) this.trace = console.log.bind(console);
else this.trace = function () {};
else this.trace = () => {};
}
}

0 comments on commit e83f0da

Please sign in to comment.