openLogs() public static method

Open logs
public static openLogs ( ) : void
return void
 /**
  * Performs initial actions.
  * @return void
  */
 public static function init()
 {
     Daemon::$startTime = time();
     set_time_limit(0);
     Daemon::$defaultErrorLevel = error_reporting();
     Daemon::$restrictErrorControl = (bool) Daemon::$config->restricterrorcontrol->value;
     ob_start(['\\PHPDaemon\\Core\\Daemon', 'outputFilter']);
     set_error_handler(['\\PHPDaemon\\Core\\Daemon', 'errorHandler']);
     Daemon::checkSupports();
     Daemon::$initservervar = $_SERVER;
     Daemon::$masters = new Collection();
     Daemon::$shm_wstate = new ShmEntity(Daemon::$config->pidfile->value, Daemon::SHM_WSTATE_SIZE, 'wstate', true);
     Daemon::openLogs();
 }
Beispiel #2
0
 /**
  * Handler of the SIGUSR1 (re-open log-file) signal in worker process.
  * @return void
  */
 protected function sigusr1()
 {
     if (Daemon::$config->logsignals->value) {
         $this->log('caught SIGUSR1 (re-open log-file).');
     }
     Daemon::openLogs();
 }