43 {
"local0", LOG_LOCAL0 },
44 {
"local1", LOG_LOCAL1 },
45 {
"local2", LOG_LOCAL2 },
46 {
"local3", LOG_LOCAL3 },
47 {
"local4", LOG_LOCAL4 },
48 {
"local5", LOG_LOCAL5 },
49 {
"local6", LOG_LOCAL6 },
50 {
"local7", LOG_LOCAL7 },
51 #if defined(HAVE_SYSLOG_FACILITY_LOG_KERN)
54 #if defined(HAVE_SYSLOG_FACILITY_LOG_MAIL)
57 #if defined(HAVE_SYSLOG_FACILITY_LOG_DAEMON)
58 {
"daemon", LOG_DAEMON },
60 #if defined(HAVE_SYSLOG_FACILITY_LOG_AUTH)
62 {
"security", LOG_AUTH },
64 #if defined(HAVE_SYSLOG_FACILITY_LOG_AUTHPRIV)
65 {
"authpriv", LOG_AUTHPRIV },
67 #if defined(HAVE_SYSLOG_FACILITY_LOG_SYSLOG)
68 {
"syslog", LOG_SYSLOG },
70 #if defined(HAVE_SYSLOG_FACILITY_LOG_FTP)
73 #if defined(HAVE_SYSLOG_FACILITY_LOG_LPR)
76 #if defined(HAVE_SYSLOG_FACILITY_LOG_NEWS)
79 #if defined(HAVE_SYSLOG_FACILITY_LOG_UUCP)
82 #if defined(HAVE_SYSLOG_FACILITY_LOG_CRON)
113 static const struct {
117 {
"alert", LOG_ALERT },
118 {
"crit", LOG_CRIT },
120 {
"emerg", LOG_EMERG },
122 {
"error", LOG_ERR },
123 {
"info", LOG_INFO },
166 if (level < 0 || level >=
ARRAY_LEN(logger_level_to_syslog_map)) {
169 return logger_level_to_syslog_map[level];
Asterisk main include file. File version handling, generic pbx functions.
int ast_syslog_priority(const char *priority)
Maps a syslog priority name from a string to a syslog priority constant.
static struct @302 priority_map[]
const char * ast_syslog_priority_name(int priority)
Maps a syslog priority constant to a string.
int ast_syslog_priority_from_loglevel(int level)
Maps an Asterisk log level (i.e. LOG_ERROR) to a syslog priority constant.
Syslog support functions for Asterisk logging.
static const int logger_level_to_syslog_map[]
static struct @301 facility_map[]
int ast_syslog_facility(const char *facility)
Maps a syslog facility name from a string to a syslog facility constant.
const char * ast_syslog_facility_name(int facility)
Maps a syslog facility constant to a string.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.