summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorScott Emidy <jemidy@digium.com>2015-08-06 15:18:04 -0500
committerScott Emidy <jemidy@digium.com>2015-08-06 17:41:11 -0500
commit78364132ce94d9ded24ae6e6ab44b97d256b506d (patch)
treea4277262f837478a57ae5a6cc03347dddbb35f30 /include
parentc07fa843ec49a114473fe3b5609d00f80ace1b3d (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/logger.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h
index be54f47ce..e9441472f 100644
--- a/include/asterisk/logger.h
+++ b/include/asterisk/logger.h
@@ -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);
@@ -92,6 +99,13 @@ void ast_log_callid(int level, const char *file, int line, const char *function,
__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
*/
void ast_log_backtrace(void);