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()));
|
||||
|
||||
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;
|
||||
}
|
||||
@ -78,7 +78,7 @@ class ServerStart extends Command
|
||||
pcntl_signal(SIGCHLD,SIG_IGN);
|
||||
|
||||
foreach ($start as $item => $config) {
|
||||
Log::debug(sprintf('%s: - Starting [%s] (%d)',self::LOGKEY,$item,getmypid()));
|
||||
Log::debug(sprintf('%s:- Starting [%s] (%d)',self::LOGKEY,$item,getmypid()));
|
||||
|
||||
$pid = pcntl_fork();
|
||||
|
||||
@ -88,7 +88,7 @@ class ServerStart extends Command
|
||||
// We are the child
|
||||
if (! $pid) {
|
||||
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->handler = [$config['class'],'onConnect'];
|
||||
@ -103,13 +103,13 @@ class ServerStart extends Command
|
||||
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.
|
||||
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);
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ class ServerStart extends Command
|
||||
if ($exited < 0)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user