mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 12:13:48 +01:00
デフォルトでログのタイムスタンプ非表示
This commit is contained in:
parent
956417d455
commit
ae687535c1
@ -10,6 +10,7 @@ program
|
||||
.option('--only-queue', 'Pocessing job queue only')
|
||||
.option('--quiet', 'Suppress all logs')
|
||||
.option('--verbose', 'Enable all logs')
|
||||
.option('--with-log-time', 'Include timestamp for each logs')
|
||||
.option('--slow', 'Delay all requests (for debbuging)')
|
||||
.option('--color', 'This option is a dummy for some external program\'s (e.g. forever) issue.')
|
||||
.parse(process.argv);
|
||||
|
@ -28,7 +28,8 @@ export default class Logger {
|
||||
} else {
|
||||
const time = dateformat(new Date(), 'HH:MM:ss');
|
||||
const process = cluster.isMaster ? '*' : cluster.worker.id;
|
||||
const log = `${chalk.gray(time)} ${level} ${process}\t[${domains.join(' ')}]\t${message}`;
|
||||
let log = `${level} ${process}\t[${domains.join(' ')}]\t${message}`;
|
||||
if (program.withLogTime) log = chalk.gray(time) + ' ' + log;
|
||||
console.log(important ? chalk.bold(log) : log);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user