@ps-aux/nodebup 0.9.6 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/log/logging.js +9 -9
- package/package.json +1 -1
package/lib/log/logging.js
CHANGED
@@ -7,20 +7,20 @@ exports.makeLog = exports.classObjLog = void 0;
|
|
7
7
|
|
8
8
|
var _pino = _interopRequireDefault(require("pino"));
|
9
9
|
|
10
|
+
var _pinoPretty = _interopRequireDefault(require("pino-pretty"));
|
11
|
+
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
13
|
|
12
|
-
// TODO set from config
|
14
|
+
// TODO set from the config
|
13
15
|
const level = process.env.NODEBUP_LOG_LEVEL || 'trace';
|
16
|
+
const sync = process.env.TS_JEST === '1';
|
17
|
+
const stream = (0, _pinoPretty.default)({
|
18
|
+
sync
|
19
|
+
});
|
14
20
|
const root = (0, _pino.default)({
|
15
21
|
name: 'root',
|
16
|
-
level
|
17
|
-
|
18
|
-
// Must be used as string. For some reason does not work as transport.
|
19
|
-
// 1. No logging in Jest
|
20
|
-
// 2. Not logging when run as CLI app
|
21
|
-
|
22
|
-
} // stream
|
23
|
-
);
|
22
|
+
level
|
23
|
+
}, stream);
|
24
24
|
|
25
25
|
const makeLog = name => {
|
26
26
|
return root.child({
|