mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-25 05:29:07 +01:00
Use logger
This commit is contained in:
parent
ae54d93c72
commit
f8b649d06c
@ -70,19 +70,16 @@ async function master(): Promise<void> {
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = (t: string, c: string) =>
|
|
||||||
console.log(chalk.bold(`--> ${(chalk as any)[c](t)}\n`));
|
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case State.failed:
|
case State.failed:
|
||||||
res('Fatal error occurred :(', 'red');
|
log('Error', chalk.red('Fatal error occurred :('));
|
||||||
process.exit();
|
process.exit();
|
||||||
return;
|
return;
|
||||||
case State.warn:
|
case State.warn:
|
||||||
res('Some problem(s) :|', 'yellow');
|
log('Warn', chalk.yellow('Some problem(s) :|'));
|
||||||
break;
|
break;
|
||||||
case State.success:
|
case State.success:
|
||||||
res('OK :)', 'green');
|
log('Info', chalk.green('OK :)'));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user