src/core/ngx_syslog.h - nginx source code

Data types defined

Macros defined

Source code


  1. /*
  2. * Copyright (C) Nginx, Inc.
  3. */


  4. #ifndef _NGX_SYSLOG_H_INCLUDED_
  5. #define _NGX_SYSLOG_H_INCLUDED_


  6. typedef struct {
  7.     ngx_uint_t         facility;
  8.     ngx_uint_t         severity;
  9.     ngx_str_t          tag;

  10.     ngx_str_t         *hostname;

  11.     ngx_addr_t         server;
  12.     ngx_connection_t   conn;

  13.     ngx_log_t          log;
  14.     ngx_log_t         *logp;

  15.     unsigned           busy:1;
  16.     unsigned           nohostname:1;
  17. } ngx_syslog_peer_t;


  18. char *ngx_syslog_process_conf(ngx_conf_t *cf, ngx_syslog_peer_t *peer);
  19. u_char *ngx_syslog_add_header(ngx_syslog_peer_t *peer, u_char *buf);
  20. void ngx_syslog_writer(ngx_log_t *log, ngx_uint_t level, u_char *buf,
  21.     size_t len);
  22. ssize_t ngx_syslog_send(ngx_syslog_peer_t *peer, u_char *buf, size_t len);


  23. #endif /* _NGX_SYSLOG_H_INCLUDED_ */