mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 16:25:13 +00:00
Rename clusterLog to clusterLogger (#4167)
This commit is contained in:
parent
bcd886c4f5
commit
61036e3a70
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