]> git.kaiwu.me - nginx.git/commitdiff
Access log: allowed logs to syslog with "if=" (ticket #596).
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 5 Aug 2014 20:22:36 +0000 (00:22 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 5 Aug 2014 20:22:36 +0000 (00:22 +0400)
src/http/modules/ngx_http_log_module.c

index bc660cdd6f82617a08ec1a7e31bfbf32866f12b1..89aa4f58e8881a7ce4d25577477fcff547a7f8f7 100644 (file)
@@ -1254,17 +1254,6 @@ process_formats:
         return NGX_CONF_ERROR;
     }
 
-    if (log->syslog_peer != NULL) {
-        if (cf->args->nelts > 3) {
-            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
-                               "parameter \"%V\" is not supported by syslog",
-                               &value[3]);
-            return NGX_CONF_ERROR;
-        }
-
-        return NGX_CONF_OK;
-    }
-
     size = 0;
     flush = 0;
     gzip = 0;
@@ -1361,6 +1350,12 @@ process_formats:
             return NGX_CONF_ERROR;
         }
 
+        if (log->syslog_peer) {
+            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+                               "logs to syslog cannot be buffered");
+            return NGX_CONF_ERROR;
+        }
+
         if (log->file->data) {
             buffer = log->file->data;