[fix] :trace level JS console logging
Some checks are pending
Clj tests / tests (21, ubuntu-latest) (push) Waiting to run
Clj tests / tests (17, ubuntu-latest) (push) Waiting to run
Clj tests / tests (19, ubuntu-latest) (push) Waiting to run
Cljs tests / tests (21, ubuntu-latest) (push) Waiting to run
Graal tests / tests (17, macOS-latest) (push) Waiting to run
Graal tests / tests (17, ubuntu-latest) (push) Waiting to run
Graal tests / tests (17, windows-latest) (push) Waiting to run

`js/console.trace` was being misused here and is actually intended
for stacktrace printing, NOT trace-level output.
This commit is contained in:
Peter Taoussanis 2025-08-21 12:40:39 +02:00
parent 1bcd46adf3
commit b2a8b66cc0

View file

@ -142,14 +142,14 @@
#?(:cljs
(defn js-console-logger
"Returns JavaScript console logger to match given signal level:
`:trace` -> `js/console.trace`,
`:debug` -> `js/console.debug`,
`:error` -> `js/console.error`, etc.
Defaults to `js.console.log` for unmatched signal levels.
NB: assumes that `js/console` exists, handler constructors should check first!"
[level]
(case level
:trace js/console.trace
:trace js/console.debug
:debug js/console.debug
:info js/console.info
:warn js/console.warn