Verbose logging application.
More...
Go to the source code of this file.
|
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Send verbose output" , .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 = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, } |
|
static char * | app_log = "Log" |
|
static char * | app_verbose = "Verbose" |
|
static struct ast_module_info * | ast_module_info = &__mod_info |
|
static void __reg_module |
( |
void |
| ) |
|
|
static |
static void __unreg_module |
( |
void |
| ) |
|
|
static |
static int load_module |
( |
void |
| ) |
|
|
static |
Definition at line 177 of file app_verbose.c.
References ast_register_application_xml, log_exec(), and verbose_exec().
static int verbose_exec(struct ast_channel *chan, const char *data)
static char * app_verbose
static int log_exec(struct ast_channel *chan, const char *data)
#define ast_register_application_xml(app, execute)
Register an application using XML documentation.
static int log_exec |
( |
struct ast_channel * |
chan, |
|
|
const char * |
data |
|
) |
| |
|
static |
Definition at line 125 of file app_verbose.c.
References __LOG_DEBUG, __LOG_DTMF, __LOG_ERROR, __LOG_NOTICE, __LOG_VERBOSE, __LOG_WARNING, args, AST_APP_ARG, AST_DECLARE_APP_ARGS, ast_log(), AST_MAX_EXTENSION, AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), context, ast_channel::context, ast_channel::exten, LOG_ERROR, parse(), and ast_channel::priority.
Referenced by load_module().
141 if (!strcasecmp(
args.level,
"ERROR")) {
143 }
else if (!strcasecmp(
args.level,
"WARNING")) {
145 }
else if (!strcasecmp(
args.level,
"NOTICE")) {
147 }
else if (!strcasecmp(
args.level,
"DEBUG")) {
149 }
else if (!strcasecmp(
args.level,
"VERBOSE")) {
151 }
else if (!strcasecmp(
args.level,
"DTMF")) {
158 snprintf(context,
sizeof(context),
"@ %s", chan->
context);
159 snprintf(extension,
sizeof(extension),
"Ext. %s", chan->
exten);
char context[AST_MAX_CONTEXT]
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
#define AST_MAX_EXTENSION
#define ast_strdupa(s)
duplicate a string in memory from the stack
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
static void parse(struct mgcp_request *req)
#define AST_APP_ARG(name)
Define an application argument.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
static char context[AST_MAX_CONTEXT]
char exten[AST_MAX_EXTENSION]
static int unload_module |
( |
void |
| ) |
|
|
static |
static int verbose_exec |
( |
struct ast_channel * |
chan, |
|
|
const char * |
data |
|
) |
| |
|
static |
Definition at line 79 of file app_verbose.c.
References args, AST_APP_ARG, AST_DECLARE_APP_ARGS, ast_log(), AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), ast_verbose(), LOG_WARNING, option_verbose, parse(), VERBOSE_PREFIX_1, VERBOSE_PREFIX_2, VERBOSE_PREFIX_3, and VERBOSE_PREFIX_4.
Referenced by load_module().
99 if (sscanf(
args.level,
"%30d", &vsize) != 1) {
void ast_verbose(const char *fmt,...)
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
#define ast_strdupa(s)
duplicate a string in memory from the stack
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
static void parse(struct mgcp_request *req)
#define AST_APP_ARG(name)
Define an application argument.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Send verbose output" , .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 = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, } |
|
static |
char* app_verbose = "Verbose" |
|
static |