mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
revert addition of LOG_SECURITY log channel; after further discussion, a much better solution will be used
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@187636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -59,7 +59,7 @@ static char *app_log = "Log";
|
|||||||
<syntax>
|
<syntax>
|
||||||
<parameter name="level">
|
<parameter name="level">
|
||||||
<para>Level must be one of <literal>ERROR</literal>, <literal>WARNING</literal>, <literal>NOTICE</literal>,
|
<para>Level must be one of <literal>ERROR</literal>, <literal>WARNING</literal>, <literal>NOTICE</literal>,
|
||||||
<literal>DEBUG</literal>, <literal>VERBOSE</literal>, <literal>DTMF</literal> or <literal>SECURITY</literal>.</para>
|
<literal>DEBUG</literal>, <literal>VERBOSE</literal> or <literal>DTMF</literal>.</para>
|
||||||
</parameter>
|
</parameter>
|
||||||
<parameter name="message" required="true">
|
<parameter name="message" required="true">
|
||||||
<para>Output text message.</para>
|
<para>Output text message.</para>
|
||||||
@@ -146,8 +146,6 @@ static int log_exec(struct ast_channel *chan, void *data)
|
|||||||
lnum = __LOG_VERBOSE;
|
lnum = __LOG_VERBOSE;
|
||||||
} else if (!strcasecmp(args.level, "DTMF")) {
|
} else if (!strcasecmp(args.level, "DTMF")) {
|
||||||
lnum = __LOG_DTMF;
|
lnum = __LOG_DTMF;
|
||||||
} else if (!strcasecmp(args.level, "SECURITY")) {
|
|
||||||
lnum = __LOG_SECURITY;
|
|
||||||
} else if (!strcasecmp(args.level, "EVENT")) {
|
} else if (!strcasecmp(args.level, "EVENT")) {
|
||||||
lnum = __LOG_EVENT;
|
lnum = __LOG_EVENT;
|
||||||
} else {
|
} else {
|
||||||
|
@@ -70,7 +70,6 @@
|
|||||||
; error
|
; error
|
||||||
; verbose
|
; verbose
|
||||||
; dtmf
|
; dtmf
|
||||||
; security
|
|
||||||
;
|
;
|
||||||
; Special filename "console" represents the system console
|
; Special filename "console" represents the system console
|
||||||
;
|
;
|
||||||
@@ -90,7 +89,6 @@ console => notice,warning,error
|
|||||||
;console => notice,warning,error,debug
|
;console => notice,warning,error,debug
|
||||||
messages => notice,warning,error
|
messages => notice,warning,error
|
||||||
;full => notice,warning,error,debug,verbose
|
;full => notice,warning,error,debug,verbose
|
||||||
security => security
|
|
||||||
|
|
||||||
;syslog keyword : This special keyword logs to syslog facility
|
;syslog keyword : This special keyword logs to syslog facility
|
||||||
;
|
;
|
||||||
|
@@ -189,18 +189,7 @@ void ast_console_toggle_loglevel(int fd, int level, int state);
|
|||||||
#endif
|
#endif
|
||||||
#define AST_LOG_DTMF __LOG_DTMF, _A_
|
#define AST_LOG_DTMF __LOG_DTMF, _A_
|
||||||
|
|
||||||
#ifdef LOG_SECURITY
|
#define NUMLOGLEVELS 6
|
||||||
#undef LOG_SECURITY
|
|
||||||
#endif
|
|
||||||
#define __LOG_SECURITY 7
|
|
||||||
#define LOG_SECURITY __LOG_SECURITY, _A_
|
|
||||||
|
|
||||||
#ifdef AST_LOG_SECURITY
|
|
||||||
#undef AST_LOG_SECURITY
|
|
||||||
#endif
|
|
||||||
#define AST_LOG_SECURITY __LOG_SECURITY, _A_
|
|
||||||
|
|
||||||
#define NUMLOGLEVELS 7
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Get the debug level for a file
|
* \brief Get the debug level for a file
|
||||||
|
@@ -162,8 +162,7 @@ static char *levels[] = {
|
|||||||
"WARNING",
|
"WARNING",
|
||||||
"ERROR",
|
"ERROR",
|
||||||
"VERBOSE",
|
"VERBOSE",
|
||||||
"DTMF",
|
"DTMF"
|
||||||
"SECURITY",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! \brief Colors used in the console for logging */
|
/*! \brief Colors used in the console for logging */
|
||||||
@@ -205,8 +204,6 @@ static int make_components(const char *s, int lineno)
|
|||||||
res |= (1 << __LOG_VERBOSE);
|
res |= (1 << __LOG_VERBOSE);
|
||||||
else if (!strcasecmp(w, "dtmf"))
|
else if (!strcasecmp(w, "dtmf"))
|
||||||
res |= (1 << __LOG_DTMF);
|
res |= (1 << __LOG_DTMF);
|
||||||
else if (!strcasecmp(w, "security"))
|
|
||||||
res |= (1 << __LOG_SECURITY);
|
|
||||||
else {
|
else {
|
||||||
fprintf(stderr, "Logfile Warning: Unknown keyword '%s' at line %d of logger.conf\n", w, lineno);
|
fprintf(stderr, "Logfile Warning: Unknown keyword '%s' at line %d of logger.conf\n", w, lineno);
|
||||||
}
|
}
|
||||||
@@ -359,7 +356,7 @@ static void init_logger_chain(int locked)
|
|||||||
if (!(chan = ast_calloc(1, sizeof(*chan))))
|
if (!(chan = ast_calloc(1, sizeof(*chan))))
|
||||||
return;
|
return;
|
||||||
chan->type = LOGTYPE_CONSOLE;
|
chan->type = LOGTYPE_CONSOLE;
|
||||||
chan->logmask = (1 << __LOG_WARNING) | (1 << __LOG_NOTICE) | (1 << __LOG_ERROR);
|
chan->logmask = 28; /*warning,notice,error */
|
||||||
if (!locked)
|
if (!locked)
|
||||||
AST_RWLIST_WRLOCK(&logchannels);
|
AST_RWLIST_WRLOCK(&logchannels);
|
||||||
AST_RWLIST_INSERT_HEAD(&logchannels, chan, list);
|
AST_RWLIST_INSERT_HEAD(&logchannels, chan, list);
|
||||||
@@ -805,8 +802,6 @@ static char *handle_logger_show_channels(struct ast_cli_entry *e, int cmd, struc
|
|||||||
ast_cli(a->fd, "Debug ");
|
ast_cli(a->fd, "Debug ");
|
||||||
if (chan->logmask & (1 << __LOG_DTMF))
|
if (chan->logmask & (1 << __LOG_DTMF))
|
||||||
ast_cli(a->fd, "DTMF ");
|
ast_cli(a->fd, "DTMF ");
|
||||||
if (chan->logmask & (1 << __LOG_SECURITY))
|
|
||||||
ast_cli(a->fd, "Security ");
|
|
||||||
if (chan->logmask & (1 << __LOG_VERBOSE))
|
if (chan->logmask & (1 << __LOG_VERBOSE))
|
||||||
ast_cli(a->fd, "Verbose ");
|
ast_cli(a->fd, "Verbose ");
|
||||||
if (chan->logmask & (1 << __LOG_WARNING))
|
if (chan->logmask & (1 << __LOG_WARNING))
|
||||||
|
Reference in New Issue
Block a user