jabberd2  2.5.0
Macros | Functions | Variables
log.c File Reference
#include "util.h"

Go to the source code of this file.

Macros

#define MAX_LOG_LINE   (1024)
 

Functions

static int _log_facility (const char *facility)
 
log_t log_new (log_type_t type, const char *ident, const char *facility)
 
void log_write (log_t log, int level, const char *msgfmt,...)
 
void log_free (log_t log)
 
void debug_log (const char *file, int line, const char *msgfmt,...)
 
void set_debug_flag (int v)
 
void set_debug_log_from_config (config_t c)
 

Variables

static const char * _log_level []
 
static log_facility_t _log_facilities []
 

Macro Definition Documentation

#define MAX_LOG_LINE   (1024)

Definition at line 23 of file log.c.

Referenced by log_write().

Function Documentation

static int _log_facility ( const char *  facility)
static

Definition at line 55 of file log.c.

References log_facility_st::facility, and log_facility_st::number.

Referenced by log_new().

log_t log_new ( log_type_t  type,
const char *  ident,
const char *  facility 
)

Definition at line 69 of file log.c.

References _log_facility(), log_STDOUT, and log_SYSLOG.

Referenced by JABBER_MAIN().

void log_write ( log_t  log,
int  level,
const char *  msgfmt,
  ... 
)

Definition at line 104 of file log.c.

References _log_level, get_debug_flag(), log_STDOUT, log_SYSLOG, and MAX_LOG_LINE.

Referenced by _authreg_auth_log(), _authreg_auth_set(), _authreg_register_set(), _c2s_client_accept_check(), _c2s_client_mio_callback(), _c2s_client_sx_callback(), _c2s_config_expand(), _c2s_hosts_expand(), _c2s_pidfile(), _c2s_router_connect(), _c2s_sx_sasl_callback(), _c2s_time_checks(), _dns_result_a(), _help_pkt_sm(), _in_packet(), _in_result(), _in_sx_callback(), _in_verify(), _out_dialback(), _out_mio_callback(), _out_result(), _out_sx_callback(), _out_verify(), _pbx_open_pipe(), _pbx_process_command(), _roster_publish_user_load(), _route_add(), _router_accept_check(), _router_pidfile(), _router_process_bind(), _router_process_route(), _router_process_throttle(), _router_process_unbind(), _router_route_unbind_walker(), _router_sx_callback(), _s2s_check_conn_routes(), _s2s_config_expand(), _s2s_hosts_expand(), _s2s_pidfile(), _s2s_router_connect(), _s2s_time_checks(), _sm_hosts_expand(), _sm_pidfile(), _sm_router_connect(), _template_roster_reload(), authreg_init(), c2s_pbx_init(), c2s_router_mio_callback(), c2s_router_sx_callback(), check_code(), dns_resolve_domain(), filter_load(), filter_packet(), in_mio_callback(), JABBER_MAIN(), message_log(), mm_new(), out_packet(), out_resolve(), out_route(), pkt_new(), pres_update(), router_mio_callback(), s2s_domain_in_whitelist(), s2s_router_mio_callback(), s2s_router_sx_callback(), send_email(), sess_end(), sess_start(), sm_mio_callback(), sm_storage_rate_limit(), sm_sx_callback(), user_create(), user_delete(), and user_table_load().

void log_free ( log_t  log)
void debug_log ( const char *  file,
int  line,
const char *  msgfmt,
  ... 
)

Definition at line 261 of file log.c.

Referenced by log_free().

void set_debug_flag ( int  v)
void set_debug_log_from_config ( config_t  c)

Variable Documentation

const char* _log_level[]
static

Definition at line 30 of file log.c.

Referenced by log_write().

log_facility_t _log_facilities[]
static

Definition at line 42 of file log.c.