Просмотр исходного кода

Allow using LOG_LOCAL* on windows, fixes #713

Jordi Boggiano 10 лет назад
Родитель
Сommit
bf61d9ff3f
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      src/Monolog/Handler/AbstractSyslogHandler.php

+ 9 - 0
src/Monolog/Handler/AbstractSyslogHandler.php

@@ -70,6 +70,15 @@ abstract class AbstractSyslogHandler extends AbstractProcessingHandler
             $this->facilities['local5'] = LOG_LOCAL5;
             $this->facilities['local6'] = LOG_LOCAL6;
             $this->facilities['local7'] = LOG_LOCAL7;
+        } else {
+            $this->facilities['local0'] = 128; // LOG_LOCAL0
+            $this->facilities['local1'] = 136; // LOG_LOCAL1
+            $this->facilities['local2'] = 144; // LOG_LOCAL2
+            $this->facilities['local3'] = 152; // LOG_LOCAL3
+            $this->facilities['local4'] = 160; // LOG_LOCAL4
+            $this->facilities['local5'] = 168; // LOG_LOCAL5
+            $this->facilities['local6'] = 176; // LOG_LOCAL6
+            $this->facilities['local7'] = 184; // LOG_LOCAL7
         }
 
         // convert textual description of facility to syslog constant