<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 日志 使用經過改造后 [Monolog](https://github.com/Seldaek/monolog) 作為日志組件,改造后支持 Swoole 協程,且擴展了控制臺打印日志的功能。 ## 組件 使用 [composer]([https://www.phpcomposer.com/](https://www.phpcomposer.com/)) 安裝: ~~~ composer require mix/monolog ~~~ ## 依賴注入配置 - [manifest/beans/log.php](https://github.com/mix-php/mix-skeleton/blob/master/manifest/beans/log.php) ## 獲取實例 通過依賴配置獲取實例: ~~~ /** @var \Mix\Monolog\Logger $log */ $log = context()->get('log'); ~~~ 在 [StartCommand.php#L43](https://github.com/mix-php/mix-skeleton/blob/master/app/Api/Commands/StartCommand.php#L43) 種配置處理器: ~~~ // 設置日志處理器 $this->log->withName('API'); $handler = new RotatingFileHandler(sprintf('%s/runtime/logs/api.log', app()->basePath), 7); $this->log->pushHandler($handler); ~~~ ## PSR 定義方法 | 方法 | | --- | | emergency($message, array $context = []) : bool | | alert($message, array $context = []) : bool | | critical($message, array $context = []) : bool | | error($message, array $context = []) : bool | | warning($message, array $context = []) : bool | | notice($message, array $context = []) : bool | | debug($message, array $context = []) : bool | | log($level, $message, array $context = []) : bool | - Sample: ``` $message = 'UserId: {userId}, Name: {name}'; $context = ['userId' => 1008, 'name' => 'your name']; $log->info($message, $context); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看