[call-me] - improve UI & logs

This commit is contained in:
Miroslav Pejic
2026-02-08 23:10:17 +01:00
parent 48f3d75347
commit d011fea861
8 changed files with 1394 additions and 509 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ const util = require('util');
const colors = require('colors');
colors.enable(); // colors.disable();
const LOGS_DEBUG = process.env.LOGS_DEBUG !== undefined ? process.env.LOGS_DEBUG === 'true' : true;
const LOGS_JSON = process.env.LOGS_JSON ? process.env.LOGS_JSON === 'true' : false;
const LOGS_JSON_PRETTY = process.env.LOGS_JSON_PRETTY ? process.env.LOGS_JSON_PRETTY === 'true' : false;
@@ -15,7 +16,7 @@ const options = {
module.exports = class Logs {
constructor(appName = 'call-me') {
this.appName = colors.yellow(appName);
this.debugOn = process.env.DEBUG !== undefined ? process.env.DEBUG === 'true' : true;
this.debugOn = LOGS_DEBUG;
this.timeStart = Date.now();
this.timeEnd = null;
this.timeElapsedMs = null;