Ver Fonte

worker: allow to set logFile as /dev/null

Vano Devium há 1 ano atrás
pai
commit
e1b40e13e5
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/Worker.php

+ 1 - 1
src/Worker.php

@@ -662,7 +662,7 @@ class Worker
         // Log file.
         static::$logFile ??= sprintf('%s/workerman.log', dirname(__DIR__, 2));
 
-        if (!is_file(static::$logFile)) {
+        if (!is_file(static::$logFile) && static::$logFile !== '/dev/null') {
             // if /runtime/logs  default folder not exists
             if (!is_dir(dirname(static::$logFile))) {
                 @mkdir(dirname(static::$logFile), 0777, true);