1
2/*
3 * Copyright (C) Nginx, Inc.
4 */
5
6
7#ifndef _NGX_SYSLOG_H_INCLUDED_
8#define _NGX_SYSLOG_H_INCLUDED_
9
10
11typedef struct {
12    ngx_pool_t       *pool;
13    ngx_uint_t        facility;
14    ngx_uint_t        severity;
15    ngx_str_t         tag;
16
17    ngx_addr_t        server;
18    ngx_connection_t  conn;
19    unsigned          busy:1;
20    unsigned          nohostname:1;
21} ngx_syslog_peer_t;
22
23
24char *ngx_syslog_process_conf(ngx_conf_t *cf, ngx_syslog_peer_t *peer);
25u_char *ngx_syslog_add_header(ngx_syslog_peer_t *peer, u_char *buf);
26void ngx_syslog_writer(ngx_log_t *log, ngx_uint_t level, u_char *buf,
27    size_t len);
28ssize_t ngx_syslog_send(ngx_syslog_peer_t *peer, u_char *buf, size_t len);
29
30
31#endif /* _NGX_SYSLOG_H_INCLUDED_ */
32