Logging changes, no functional changes
This commit is contained in:
parent
dcae06aad9
commit
3d4431da9a
@ -70,7 +70,7 @@ class ServerStart extends Command
|
|||||||
Log::debug(sprintf('%s:# Servers [%d]',self::LOGKEY,$start->count()));
|
Log::debug(sprintf('%s:# Servers [%d]',self::LOGKEY,$start->count()));
|
||||||
|
|
||||||
if (! $start->count()) {
|
if (! $start->count()) {
|
||||||
Log::alert(sprintf('%s:- No servers configured to start',self::LOGKEY));
|
Log::alert(sprintf('%s:! No servers configured to start',self::LOGKEY));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ class ServerStart extends Command
|
|||||||
// We are the child
|
// We are the child
|
||||||
if (! $pid) {
|
if (! $pid) {
|
||||||
Log::withContext(['pid'=>getmypid()]);
|
Log::withContext(['pid'=>getmypid()]);
|
||||||
Log::info(sprintf('%s: - Started [%s]',self::LOGKEY,$item));
|
Log::info(sprintf('%s:= Started [%s]',self::LOGKEY,$item));
|
||||||
|
|
||||||
$server = new SocketServer($config['port'],$config['address'],$config['proto']);
|
$server = new SocketServer($config['port'],$config['address'],$config['proto']);
|
||||||
$server->handler = [$config['class'],'onConnect'];
|
$server->handler = [$config['class'],'onConnect'];
|
||||||
@ -103,13 +103,13 @@ class ServerStart extends Command
|
|||||||
Log::emergency(sprintf('%s:! Uncaught Message: %s',self::LOGKEY,$e->getMessage()));
|
Log::emergency(sprintf('%s:! Uncaught Message: %s',self::LOGKEY,$e->getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::info(sprintf('%s: - Finished: [%s]',self::LOGKEY,$item));
|
Log::info(sprintf('%s:= Finished: [%s]',self::LOGKEY,$item));
|
||||||
|
|
||||||
// Child finished we need to get out of this loop.
|
// Child finished we need to get out of this loop.
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::info(sprintf('%s: - Forked for [%s] (%d)',self::LOGKEY,$item,$pid));
|
Log::debug(sprintf('%s:- Forked for [%s] (%d)',self::LOGKEY,$item,$pid));
|
||||||
$children->put($pid,$item);
|
$children->put($pid,$item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ class ServerStart extends Command
|
|||||||
if ($exited < 0)
|
if ($exited < 0)
|
||||||
abort(500,'Something strange for status: '.serialize($status));
|
abort(500,'Something strange for status: '.serialize($status));
|
||||||
|
|
||||||
Log::info(sprintf('%s: - Exited: #%d [%s]',self::LOGKEY,$x,$children->pull($exited)));
|
Log::info(sprintf('%s:= Exited: #%d [%s]',self::LOGKEY,$x,$children->pull($exited)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Done
|
// Done
|
||||||
|
Loading…
Reference in New Issue
Block a user