Files
node/lib/internal
Joyee Cheung 2e4ceb5747 util: access process states lazily in debuglog
`debuglog()` depends on `process.pid` and `process.env.NODE_DEBUG`,
so it needs to be called lazily in top scopes of internal modules
that may be loaded before these run time states are allowed to
be accessed. This patch makes its implementation lazy by default,
the process states are only accessed when the returned debug
function is called for the first time.

PR-URL: https://github.com/nodejs/node/pull/27281
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-04-20 00:30:38 +08:00
..
2019-04-12 19:29:24 +08:00
2019-02-14 00:00:50 +01:00
2018-05-18 15:25:41 +02:00
2019-04-11 05:40:59 +02:00
2018-11-16 21:56:29 +09:00
2019-03-25 16:28:07 +01:00
2019-04-10 20:35:54 -04:00

Internal Modules

The modules in lib/internal are intended for internal use in Node.js core only, and are not accessible with require() from user modules. These modules can be changed at any time. Reliance on these modules outside of core is not supported in any way.