久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網
      最全最豐富的資訊網站

      PHP協(xié)程框架Hyperf日志查看組件

      最近在Hyperf中需要用到使用路由在線查看文件日志的功能,沒有發(fā)現(xiàn)比較好用的,自己簡單寫了一個,支持查看和簡單的內容搜索。

      一、界面

      先上效果圖:

      PHP協(xié)程框架Hyperf日志查看組件

      二、使用

      • 1.安裝組件

      composer require sett/hyperf-log-viewer

      • 2.發(fā)布配置文件

      php bin/hyperf.php vendor:publish sett/hyperf-log-viewer

      • 3.注冊路由

      Router::get('/logs', 'SettLogViewerControllerLogViewController@index');

      • 4.安裝view組件

      composer require hyperf/view

      • 5.安裝模板引擎

      composer require sy-records/think-template

      • 6.配置視圖

      在configautoloadviewe.php文件中(如果不存在,自行創(chuàng)建),添加如下視圖配置

      return [         'engine' => ThinkEngine::class,         'mode'   => Mode::TASK,         'config' => [             // 若下列文件夾不存在請自行創(chuàng)建             'view_path'  => BASE_PATH . '/storage/view/',             'cache_path' => BASE_PATH . '/runtime/view/',         ],];
      • 7.配置組件參數(shù)

      在configautoloadlogViewer.php文件中,添加自己的日志文件目錄

      return [     "path" => BASE_PATH . "/runtime/logs/",     "pattern" => "*.log",     "size" => 10     ];

      三、說明

      • 日志時間格式只支持年月日時分秒格式,否則可能看不到記錄

      贊(0)
      分享到: 更多 (0)
      網站地圖   滬ICP備18035694號-2    滬公網安備31011702889846號