mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
chore(console): distinguish between log levels (#9824)
Change `Console.#printFunc` to pass a log level as the second argument (0 = debug, 3 = error), instead of a boolean for `isErr`. This does not change the Deno runtime behaviour at all.
This commit is contained in:
parent
20627c9136
commit
62716422b9
3 changed files with 41 additions and 14 deletions
|
@ -290,7 +290,9 @@ delete Object.prototype.__proto__;
|
|||
btoa: util.writable(btoa),
|
||||
clearInterval: util.writable(timers.clearInterval),
|
||||
clearTimeout: util.writable(timers.clearTimeout),
|
||||
console: util.writable(new Console(core.print)),
|
||||
console: util.writable(
|
||||
new Console((msg, level) => core.print(msg, level > 1)),
|
||||
),
|
||||
crypto: util.readOnly(crypto),
|
||||
fetch: util.writable(fetch.fetch),
|
||||
performance: util.writable(performance.performance),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue