node
node copied to clipboard
src,lib: expose getCategoryEnabledBuffer to use on node.http
This PR is a simplified version of https://github.com/nodejs/node/pull/48142
With this function, I also plan to replace all the references of isTraceCategoryEnabled
.
I made this function generic also to support cases like:
https://github.com/nodejs/node/blob/53ac448022b7cdfcc09296da88d9a1b59921f6bf/lib/internal/util/debuglog.js#L375
In this code, the category can be anything, so this function will handle those cases as well.