Added necessary condition

This commit is contained in:
Subhash 2019-10-29 16:08:26 +05:30
parent d2172f1e35
commit a42fffd886

View File

@ -135,7 +135,10 @@ Log.stream = function(Client, id, raw, timestamp, exclusive, highlight) {
process.stdout.write(chalk.red(pad(' '.repeat(min_padding), name) + ' | '));
else if (!raw && (id === 'all' || id === 'PM2'))
process.stdout.write(chalk.blue(pad(' '.repeat(min_padding), 'PM2') + ' | '));
process.stdout.write(util.format(line).replace(highlight, chalk.bgBlackBright(highlight)) + '\n');
if (highlight)
process.stdout.write(util.format(line).replace(highlight, chalk.bgBlackBright(highlight)) + '\n');
else
process.stdout.write(util.format(line)+ '\n');
});
});
});
@ -289,7 +292,10 @@ Log.formatStream = function(Client, id, raw, timestamp, exclusive, highlight) {
}
process.stdout.write('message=');
process.stdout.write(util.format(line).replace(highlight, chalk.bgBlackBright(highlight)) + '\n');
if (highlight)
process.stdout.write(util.format(line).replace(highlight, chalk.bgBlackBright(highlight)) + '\n');
else
process.stdout.write(util.format(line) + '\n');
});
});
});