mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 01:47:39 -07:00
Rename clusterLog to clusterLogger (#4167)
This commit is contained in:
parent
7068d5fea2
commit
500426f238
1 changed files with 4 additions and 4 deletions
|
@ -26,7 +26,7 @@ import { showMachineInfo } from './misc/show-machine-info';
|
|||
|
||||
const logger = new Logger('core', 'cyan');
|
||||
const bootLogger = logger.createSubLogger('boot', 'magenta');
|
||||
const clusterLog = logger.createSubLogger('cluster', 'orange');
|
||||
const clusterLogger = logger.createSubLogger('cluster', 'orange');
|
||||
const ev = new Xev();
|
||||
|
||||
/**
|
||||
|
@ -249,19 +249,19 @@ function spawnWorker(): Promise<void> {
|
|||
|
||||
// Listen new workers
|
||||
cluster.on('fork', worker => {
|
||||
clusterLog.debug(`Process forked: [${worker.id}]`);
|
||||
clusterLogger.debug(`Process forked: [${worker.id}]`);
|
||||
});
|
||||
|
||||
// Listen online workers
|
||||
cluster.on('online', worker => {
|
||||
clusterLog.debug(`Process is now online: [${worker.id}]`);
|
||||
clusterLogger.debug(`Process is now online: [${worker.id}]`);
|
||||
});
|
||||
|
||||
// Listen for dying workers
|
||||
cluster.on('exit', worker => {
|
||||
// Replace the dead worker,
|
||||
// we're not sentimental
|
||||
clusterLog.error(chalk.red(`[${worker.id}] died :(`));
|
||||
clusterLogger.error(chalk.red(`[${worker.id}] died :(`));
|
||||
cluster.fork();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue