ARI: Deleting log channels

An http request can be sent to delete a log channel
in Asterisk.

The command "curl -v -u user:pass -X DELETE 'http://localhost:8088
/ari/asterisk/logging/mylog'" can be run in the terminal
to access the newly implemented functionally for ARI.

* Able to delete log channels using ARI

ASTERISK-25252

Change-Id: Id6eeb54ebcc511595f0418d586ff55914bc3aae6
This commit is contained in:
Scott Emidy
2015-08-06 15:18:04 -05:00
parent c07fa843ec
commit 78364132ce
8 changed files with 218 additions and 12 deletions

View File

@@ -45,6 +45,13 @@ extern "C" {
#define AST_CALLID_BUFFER_LENGTH 13
enum ast_logger_results {
AST_LOGGER_SUCCESS = 0, /*!< Log channel was created or deleted successfully*/
AST_LOGGER_FAILURE = 1, /*!< Log channel already exists for create or doesn't exist for deletion of log channel */
AST_LOGGER_DECLINE = -1, /*!< Log channel request was not accepted */
AST_LOGGER_ALLOC_ERROR = -2 /*!< filename allocation error */
};
/*! \brief Used for sending a log message
This is the standard logger function. Probably the only way you will invoke it would be something like this:
ast_log(AST_LOG_WHATEVER, "Problem with the %s Captain. We should get some more. Will %d be enough?\n", "flux capacitor", 10);
@@ -91,6 +98,13 @@ struct ast_callid;
void ast_log_callid(int level, const char *file, int line, const char *function, struct ast_callid *callid, const char *fmt, ...)
__attribute__((format(printf, 6, 7)));
/*!
* \brief Delete the specified log channel
*
* \param log_channel The log channel to delete
*/
int ast_logger_remove_channel(const char *log_channel);
/*!
* \brief Log a backtrace of the current thread's execution stack to the Asterisk log
*/