File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1+ 'use strict'
2+
3+ // See `index.js` for an alternative to this file
4+ module . exports = require ( './src' )
Original file line number Diff line number Diff line change 11'use strict'
22
3- module . exports = require ( './src' )
3+ const setup = require ( './src' )
4+
5+ // Logging setup is automatically performed by `node -r log-process-errors` or
6+ // `require('log-process-errors')`.
7+ // It encourages using `node -r` to prevent from adding this helper in the
8+ // source code. This is beneficial in the following use cases:
9+ // - when using it for debugging purpose only
10+ // - discouraging libraries from shipping this code, as it mutates global
11+ // environment. This could lead to unexpected side-effects when requiring
12+ // the library, and to conflicts between libraries.
13+ // Also it ensures this code is called as early as possible, to make sure early
14+ // events are caught.
15+ // To either defer the call or to pass options, one must use instead
16+ // `require('log-process-errors/custom')(options)`
17+ setup ( )
You can’t perform that action at this time.
0 commit comments