From 1a3dfdad3d8a232de34440eaf3049777c92ceb1c Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Tue, 13 Oct 2020 10:38:27 +0200 Subject: [PATCH] README: clarify DEBUG_ envvar parsing --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 88dae35d..47aa2eab 100644 --- a/README.md +++ b/README.md @@ -171,9 +171,15 @@ change the behavior of the debug logging: | `DEBUG_DEPTH` | Object inspection depth. | | `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | - -__Note:__ The environment variables beginning with `DEBUG_` end up being +__Note:__ Any environment variables beginning with `DEBUG_` end up being converted into an Options object that gets used with `%o`/`%O` formatters. + +To set these variables, you can use the following string values: +- one of "yes", "on", "true", "enabled": `true` +- one of "no", "off", "false", "disabled": `false` +- "null": `null` +- anything else is parsed as a number + See the Node.js documentation for [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) for the complete list.