summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nginx/src/core/ngx_log.h
diff options
context:
space:
mode:
authorrobert <robert@openbsd.org>2014-06-12 15:27:08 +0000
committerrobert <robert@openbsd.org>2014-06-12 15:27:08 +0000
commit48c5ce6cae7e303dfeee3a51091514ba4307bd3d (patch)
tree2c947b91869e053e1c22daedc8be6fc26be784d6 /usr.sbin/nginx/src/core/ngx_log.h
parentDisable the "switch to insertion sort" optimization to avoid quadratic (diff)
downloadwireguard-openbsd-48c5ce6cae7e303dfeee3a51091514ba4307bd3d.tar.xz
wireguard-openbsd-48c5ce6cae7e303dfeee3a51091514ba4307bd3d.zip
update to 1.6.0 with official syslog support backported from the 1.7 branch
tested by several, ok sthen@
Diffstat (limited to 'usr.sbin/nginx/src/core/ngx_log.h')
-rw-r--r--usr.sbin/nginx/src/core/ngx_log.h29
1 files changed, 10 insertions, 19 deletions
diff --git a/usr.sbin/nginx/src/core/ngx_log.h b/usr.sbin/nginx/src/core/ngx_log.h
index 5e7fdbf4b4e..c1a52c44f0b 100644
--- a/usr.sbin/nginx/src/core/ngx_log.h
+++ b/usr.sbin/nginx/src/core/ngx_log.h
@@ -12,13 +12,6 @@
#include <ngx_config.h>
#include <ngx_core.h>
-#if (NGX_ENABLE_SYSLOG)
-#include <syslog.h>
-
-#define SYSLOG_FACILITY LOG_LOCAL5
-#define ERR_SYSLOG_PRIORITY LOG_ERR
-#endif
-
#define NGX_LOG_STDERR 0
#define NGX_LOG_EMERG 1
@@ -50,6 +43,8 @@
typedef u_char *(*ngx_log_handler_pt) (ngx_log_t *log, u_char *buf, size_t len);
+typedef void (*ngx_log_writer_pt) (ngx_log_t *log, ngx_uint_t level,
+ u_char *buf, size_t len);
struct ngx_log_s {
@@ -61,6 +56,9 @@ struct ngx_log_s {
ngx_log_handler_pt handler;
void *data;
+ ngx_log_writer_pt writer;
+ void *wdata;
+
/*
* we declare "action" as "char *" because the actions are usually
* the static strings and in the "u_char *" case we have to override
@@ -69,12 +67,7 @@ struct ngx_log_s {
char *action;
-#if (NGX_ENABLE_SYSLOG)
- ngx_int_t priority;
- ngx_int_t facility;
- unsigned syslog_on:1; /* unsigned :1 syslog_on */
- unsigned syslog_set:1; /*unsigned :1 syslog_set */
-#endif
+ ngx_log_t *next;
};
@@ -234,15 +227,13 @@ void ngx_cdecl ngx_log_debug_core(ngx_log_t *log, ngx_err_t err,
/*********************************/
ngx_log_t *ngx_log_init(u_char *prefix);
-ngx_log_t *ngx_log_create(ngx_cycle_t *cycle, ngx_str_t *name);
-#if (NGX_ENABLE_SYSLOG)
-ngx_int_t ngx_log_get_priority(ngx_conf_t *cf, ngx_str_t *priority);
-char * ngx_log_set_priority(ngx_conf_t *cf, ngx_str_t *priority, ngx_log_t *log);
-#endif
-char *ngx_log_set_levels(ngx_conf_t *cf, ngx_log_t *log);
void ngx_cdecl ngx_log_abort(ngx_err_t err, const char *fmt, ...);
void ngx_cdecl ngx_log_stderr(ngx_err_t err, const char *fmt, ...);
u_char *ngx_log_errno(u_char *buf, u_char *last, ngx_err_t err);
+ngx_int_t ngx_log_open_default(ngx_cycle_t *cycle);
+ngx_int_t ngx_log_redirect_stderr(ngx_cycle_t *cycle);
+ngx_log_t *ngx_log_get_file_log(ngx_log_t *head);
+char *ngx_log_set_log(ngx_conf_t *cf, ngx_log_t **head);
/*