Example #1
0
 public function beforeStop()
 {
     File::appendText(App::path('cache') . "/" . get_called_class() . "_stop.log", $this->getPID() . "_" . posix_getpid() . "_" . time() . "\r\n");
 }
Example #2
0
<?php

/**
 * Created by PhpStorm.
 * User: lbob
 * Date: 2015/12/8
 * Time: 14:25
 */
use Xaircraft\Core\IO\File;
use Xaircraft\Exception\DaemonException;
use Xaircraft\Exception\HttpAuthenticationException;
return array(HttpAuthenticationException::class => function ($ex) {
    var_dump("aa");
}, DaemonException::class => function ($ex) {
    $path = \Xaircraft\App::path('log') . "/daemon/" . date("Ymd", time()) . '.log';
    File::appendText($path, $ex->getMessage);
});