aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/logger.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/logger.c b/main/logger.c
index 92630ba7a..4b5c8401b 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -909,12 +909,13 @@ static void logger_print_normal(struct logmsg *logmsg)
int res = 0;
/* If no file pointer exists, skip it */
- if (!chan->fileptr)
+ if (!chan->fileptr) {
continue;
-
+ }
+
/* Print out to the file */
res = fprintf(chan->fileptr, "[%s] %s[%ld] %s: %s",
- logmsg->date, levels[logmsg->level], logmsg->process_id, logmsg->file, logmsg->str);
+ logmsg->date, levels[logmsg->level], logmsg->process_id, logmsg->file, term_strip(buf, logmsg->str, BUFSIZ));
if (res <= 0 && !ast_strlen_zero(logmsg->str)) {
fprintf(stderr, "**** Asterisk Logging Error: ***********\n");
if (errno == ENOMEM || errno == ENOSPC)