浏览代码

Add worker mode information to statistics file

冷丶秋秋秋秋秋 1 年之前
父节点
当前提交
3e304eee68
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/Worker.php

+ 2 - 0
src/Worker.php

@@ -2018,6 +2018,8 @@ class Worker
             file_put_contents(static::$statisticsFile, serialize($allWorkerInfo) . "\n", FILE_APPEND);
             $loadavg = function_exists('sys_getloadavg') ? array_map(round(...), sys_getloadavg(), [2, 2, 2]) : ['-', '-', '-'];
             file_put_contents(static::$statisticsFile,
+                (static::$daemonize ? "Start worker in DAEMON mode." : "Start worker in DEBUG mode.") . "\n", FILE_APPEND);
+            file_put_contents(static::$statisticsFile,
                 "----------------------------------------------GLOBAL STATUS----------------------------------------------------\n", FILE_APPEND);
             file_put_contents(static::$statisticsFile,
                 'Workerman version:' . static::VERSION . "          PHP version:" . PHP_VERSION . "\n", FILE_APPEND);