Skip to content

Commit ec25c33

Browse files
author
tyler
committed
doc: updated wildcard debuglog example on util
1 parent 668fa2b commit ec25c33

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/util.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ is wrapped in an `Error` with the original value stored in a field named
7575
added: v0.11.3
7676
-->
7777

78-
* `section` {string} A string identifying the portion of the application for
78+
* `section` {string} A wildcard string identifying the portion of the application for
7979
which the `debuglog` function is being created.
8080
* Returns: {Function} The logging function
8181

@@ -89,16 +89,16 @@ For example:
8989

9090
```js
9191
const util = require('util');
92-
const debuglog = util.debuglog('foo');
92+
const debuglog = util.debuglog('foo-bar');
9393

9494
debuglog('hello from foo [%d]', 123);
9595
```
9696

97-
If this program is run with `NODE_DEBUG=foo` in the environment, then
97+
If this program is run with `NODE_DEBUG=foo*` or `NODE_DEBUG=foo-bar` in the environment, then
9898
it will output something like:
9999

100100
```txt
101-
FOO 3245: hello from foo [123]
101+
FOO-BAR 3245: hello from foo [123]
102102
```
103103

104104
where `3245` is the process id. If it is not run with that

0 commit comments

Comments
 (0)