summaryrefslogtreecommitdiff
path: root/include/asterisk/logger.h
diff options
context:
space:
mode:
authorScott Emidy <jemidy@digium.com>2015-08-07 14:20:29 -0500
committerScott Emidy <jemidy@digium.com>2015-08-07 14:57:45 -0500
commit12e6f5ac01cac88f1f2ddd60b6dbe3f8755c5ef8 (patch)
treedd0f743affba1c2b33e0bea7886e57c668e5ef16 /include/asterisk/logger.h
parentb91ca7ba49ce74152139309fd0ae1a66df695cc0 (diff)
ARI: Retrieve existing log channels
An http request can be sent to get the existing Asterisk logs. The command "curl -v -u user:pass -X GET 'http://localhost:8088 /ari/asterisk/logging'" can be run in the terminal to access the newly implemented functionality. * Retrieve all existing log channels ASTERISK-25252 Change-Id: I7bb08b93e3b938c991f3f56cc5d188654768a808
Diffstat (limited to 'include/asterisk/logger.h')
-rw-r--r--include/asterisk/logger.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asterisk/logger.h b/include/asterisk/logger.h
index 60b68082e..bf8ce6acf 100644
--- a/include/asterisk/logger.h
+++ b/include/asterisk/logger.h
@@ -99,6 +99,21 @@ void ast_log_callid(int level, const char *file, int line, const char *function,
__attribute__((format(printf, 6, 7)));
/*!
+ * \brief Retrieve the existing log channels
+ * \param logentry A callback to an updater function
+ * \param data Data passed into the callback for manipulation
+ *
+ * For each of the logging channels, logentry will be executed with the
+ * channel file name, log type, status of the log, and configuration levels.
+ *
+ * \retval 0 on success
+ * \retval 1 on failure
+ * \retval -2 on allocation error
+ */
+int ast_logger_get_channels(int (*logentry)(const char *channel, const char *type,
+ const char *status, const char *configuration, void *data), void *data);
+
+/*!
* \brief Create a log channel
*
* \param log_channel Log channel to create