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:55:53 -0500
commitdf9ce3636695781be6ab2479f90766a56747dbd7 (patch)
tree48963ab145b594360a26dc3ea9085c1e2c5dd970 /include/asterisk/logger.h
parente9f1bc08cbda7759707c30b8883b266555d0fefc (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 18701a198..d06aecf20 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