-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.
Description
- Version: all
- Platform: all
- Subsystem: util
Refs: #13728
Currently, util.debuglog()
doesn't support wildcard. It will be more dev friendly if it could.
Consider the structure below,
├── classifiers
| ├── logical-regression.js
| └── linear-regression.js
| └── decision-tree.js
| └── ..lots of files...
├-index.js
we might have different files in the same module, and we really don't want to output those logs at the same time.
So a possible solution could be, we define a prefix/postfix to the same module, e.g. util.debuglog('classifiers-logical-regressions')
, util.debuglog('classifiers-linear-regression')
Then we could define the NODE_DEBUG below to output *-regressions
only logs, would be logical-regression
and linear-regression
in this case.
> SET NODE_DEBUG=classifiers-*-regression
> node index.js
Please feel free to add more comments.
starkwang and sindresorhus
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.utilIssues and PRs related to the built-in util module.Issues and PRs related to the built-in util module.