From cc52ee58c15f81d72c96b1b686e0cb927b42bbda Mon Sep 17 00:00:00 2001 From: gitname Date: Tue, 1 Feb 2022 19:29:36 -0800 Subject: [PATCH 1/2] Add section about configuring JS console to show debug messages --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 5ea4cd27..d5e149f3 100644 --- a/README.md +++ b/README.md @@ -241,6 +241,13 @@ setInterval(function(){ }, 1200); ``` +### Configuring the JavaScript console to show debug messages + +By default, `debug` uses the `console.debug()` function to send messages to the JavaScript console. That function sends messages to the JavaScript console at the "debug" log level. According to [MDN](https://developer.mozilla.org/en-US/docs/Web/API/console/debug), some JavaScript consoles are—by default—configured to _hide_ log entries that are sent to it at the "debug" log level. + +You can configure your JavaScript console to _show_ those log entries, by enabling the "Verbose" log level (sometimes called the "Debug" log level) in your JavaScript console. Here's what that process looks like in an [Electron app](https://github.com/debug-js/debug/issues/808#issuecomment-1027516372), for example: + + ## Output streams From 3125cc6df4eab28a61710a21eb9397f6b56941db Mon Sep 17 00:00:00 2001 From: gitname Date: Wed, 2 Feb 2022 15:12:05 -0800 Subject: [PATCH 2/2] Rewrite log level section to be more concise --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index d5e149f3..e9c3e047 100644 --- a/README.md +++ b/README.md @@ -241,11 +241,7 @@ setInterval(function(){ }, 1200); ``` -### Configuring the JavaScript console to show debug messages - -By default, `debug` uses the `console.debug()` function to send messages to the JavaScript console. That function sends messages to the JavaScript console at the "debug" log level. According to [MDN](https://developer.mozilla.org/en-US/docs/Web/API/console/debug), some JavaScript consoles are—by default—configured to _hide_ log entries that are sent to it at the "debug" log level. - -You can configure your JavaScript console to _show_ those log entries, by enabling the "Verbose" log level (sometimes called the "Debug" log level) in your JavaScript console. Here's what that process looks like in an [Electron app](https://github.com/debug-js/debug/issues/808#issuecomment-1027516372), for example: +In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.