mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
Added necessary condition
This commit is contained in:
parent
d2172f1e35
commit
a42fffd886
@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user