summaryrefslogtreecommitdiff
path: root/main/logger.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/logger.c')
-rw-r--r--main/logger.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/main/logger.c b/main/logger.c
index ca2648190..6d6227bfc 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -793,6 +793,16 @@ static int reload_logger(int rotate, const char *altconf)
AST_RWLIST_TRAVERSE(&logchannels, f, list) {
if (f->disabled) {
f->disabled = 0; /* Re-enable logging at reload */
+ /*** DOCUMENTATION
+ <managerEventInstance>
+ <synopsis>Raised when a logging channel is re-enabled after a reload operation.</synopsis>
+ <syntax>
+ <parameter name="Channel">
+ <para>The name of the logging channel.</para>
+ </parameter>
+ </syntax>
+ </managerEventInstance>
+ ***/
manager_event(EVENT_FLAG_SYSTEM, "LogChannel", "Channel: %s\r\nEnabled: Yes\r\n", f->filename);
}
if (f->fileptr && (f->fileptr != stdout) && (f->fileptr != stderr)) {
@@ -1089,6 +1099,16 @@ static void logger_print_normal(struct logmsg *logmsg)
fprintf(stderr, "Asterisk logging error: Out of disk space, can't log to log file %s\n", chan->filename);
else
fprintf(stderr, "Logger Warning: Unable to write to log file '%s': %s (disabled)\n", chan->filename, strerror(errno));
+ /*** DOCUMENTATION
+ <managerEventInstance>
+ <synopsis>Raised when a logging channel is disabled.</synopsis>
+ <syntax>
+ <parameter name="Channel">
+ <para>The name of the logging channel.</para>
+ </parameter>
+ </syntax>
+ </managerEventInstance>
+ ***/
manager_event(EVENT_FLAG_SYSTEM, "LogChannel", "Channel: %s\r\nEnabled: No\r\nReason: %d - %s\r\n", chan->filename, errno, strerror(errno));
chan->disabled = 1;
} else if (res > 0) {