Asterisk - The Open Source Telephony Project
18.5.0
|
syslog CDR logger More...
#include "asterisk.h"
#include "asterisk/module.h"
#include "asterisk/lock.h"
#include "asterisk/cdr.h"
#include "asterisk/pbx.h"
#include <syslog.h>
Go to the source code of this file.
Data Structures | |
struct | cdr_syslog_config |
struct | sinks |
Functions | |
static void | __init_syslog_buf (void) |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static void | free_config (void) |
static int | load_config (int reload) |
static enum ast_module_load_result | load_module (void) |
static int | reload (void) |
static int | syslog_log (struct ast_cdr *cdr) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Customizable syslog CDR Backend" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload, .load_pri = AST_MODPRI_CDR_DRIVER, .requires = "cdr", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static const char | CONFIG [] = "cdr_syslog.conf" |
static const char | name [] = "cdr-syslog" |
static struct sinks | sinks = { .first = NULL, .last = NULL, .lock = { PTHREAD_RWLOCK_INITIALIZER , NULL, {1, 0} } , } |
static struct ast_threadstorage | syslog_buf = { .once = PTHREAD_ONCE_INIT , .key_init = __init_syslog_buf , .custom_init = NULL , } |
|
static |
Definition at line 58 of file cdr_syslog.c.
|
static |
Definition at line 296 of file cdr_syslog.c.
|
static |
Definition at line 296 of file cdr_syslog.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 296 of file cdr_syslog.c.
|
static |
Definition at line 75 of file cdr_syslog.c.
References ast_free, ast_mutex_destroy, AST_RWLIST_REMOVE_HEAD, ast_string_field_free_memory, cdr_syslog_config::list, and cdr_syslog_config::lock.
Referenced by load_config(), reload(), and unload_module().
|
static |
Definition at line 134 of file cdr_syslog.c.
References ast_calloc_with_stringfields, ast_category_browse(), ast_config_destroy(), ast_config_load, ast_log, AST_LOG_ERROR, AST_LOG_WARNING, ast_mutex_init, AST_RWLIST_EMPTY, AST_RWLIST_INSERT_TAIL, ast_string_field_set, ast_strlen_zero, ast_syslog_facility(), ast_syslog_facility_name(), ast_syslog_priority(), ast_syslog_priority_name(), ast_variable_retrieve(), CONFIG, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEMISSING, CONFIG_STATUS_FILEUNCHANGED, cdr_syslog_config::facility, cdr_syslog_config::format, free_config(), cdr_syslog_config::ident, cdr_syslog_config::list, cdr_syslog_config::lock, NULL, cdr_syslog_config::priority, and tmp().
Referenced by load_module(), and reload().
|
static |
Definition at line 254 of file cdr_syslog.c.
References ast_cdr_register(), ast_log, AST_LOG_ERROR, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_module_info::description, load_config(), name, and syslog_log().
Referenced by reload().
|
static |
Definition at line 272 of file cdr_syslog.c.
References ast_log, AST_LOG_ERROR, AST_MODFLAG_LOAD_ORDER, AST_MODPRI_CDR_DRIVER, AST_MODULE_INFO(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, AST_MODULE_SUPPORT_CORE, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ASTERISK_GPL_KEY, free_config(), load_config(), load_module(), and unload_module().
|
static |
Definition at line 86 of file cdr_syslog.c.
References ast_cdr_dup(), ast_channel_cdr_set(), ast_channel_unref, ast_dummy_channel_alloc, AST_LIST_TRAVERSE, ast_log, AST_LOG_ERROR, ast_mutex_lock, ast_mutex_unlock, AST_RWLIST_RDLOCK, AST_RWLIST_UNLOCK, ast_str_buffer(), ast_str_substitute_variables(), ast_str_thread_get(), dummy(), cdr_syslog_config::facility, cdr_syslog_config::format, cdr_syslog_config::ident, cdr_syslog_config::list, cdr_syslog_config::lock, cdr_syslog_config::priority, str, and syslog_buf.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 237 of file cdr_syslog.c.
References ast_cdr_register(), ast_cdr_unregister(), ast_log, AST_LOG_ERROR, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_module_info::description, free_config(), name, and syslog_log().
Referenced by reload().
|
static |
Definition at line 296 of file cdr_syslog.c.
|
static |
Definition at line 296 of file cdr_syslog.c.
|
static |
Definition at line 56 of file cdr_syslog.c.
Referenced by load_config().
|
static |
Definition at line 60 of file cdr_syslog.c.
Referenced by load_module(), and unload_module().
|
static |
|
static |
Definition at line 58 of file cdr_syslog.c.
Referenced by syslog_log().