Improved and re-enabled why-is-node-running logger.
This commit is contained in:
parent
cdb7dcd6e9
commit
1c0c30be11
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
// const log = require('why-is-node-running');
|
const log = require('why-is-node-running');
|
||||||
const Inspector = require('inspector-api');
|
const Inspector = require('inspector-api');
|
||||||
const fs = require('fs').promises;
|
const fs = require('fs').promises;
|
||||||
const dayjs = require('dayjs');
|
const dayjs = require('dayjs');
|
||||||
|
@ -25,11 +25,12 @@ const inspector = new Inspector();
|
||||||
let done = false;
|
let done = false;
|
||||||
|
|
||||||
function logActive() {
|
function logActive() {
|
||||||
console.log('log active!');
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// log();
|
log();
|
||||||
|
|
||||||
|
if (!done) {
|
||||||
logActive();
|
logActive();
|
||||||
|
}
|
||||||
}, typeof argv.logActive === 'number' ? argv.logActive : 60000);
|
}, typeof argv.logActive === 'number' ? argv.logActive : 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue