Пример #1
0
 public function __construct(PsrLogger $logger)
 {
     parent::__construct($logger);
     $this->logger = $logger;
     $this->procGarbageWatcher = \Amp\repeat(function () {
         $this->collectProcessGarbage();
     }, 100, ["enable" => false]);
 }
Пример #2
0
 public function __construct(PsrLogger $logger, Bootstrapper $bootstrapper = null)
 {
     parent::__construct($logger);
     $this->logger = $logger;
     $this->bootstrapper = $bootstrapper ?: new Bootstrapper();
 }
Пример #3
0
 protected function exit()
 {
     $this->logger->flush();
     parent::exit();
 }