aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-24 21:02:18 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-24 21:02:18 +0000
commit84933f21841e667d4f4fa5d629ecbae303e8c26a (patch)
tree954f7078eec584f67e78a0ae860972100dc058f1
parent5c6fd0b59e5d7a4b3e5b7e67b345e920201fec47 (diff)
Remove color code sequences from verbose messages that go to logfiles.
(closes issue #16786) Reported by: dodo Patches: logger2.patch uploaded by dodo (license 989) Tested by: tilghman git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@248582 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/logger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/logger.c b/main/logger.c
index e1913eed3..99ab0b288 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -785,7 +785,7 @@ void ast_log(int level, const char *file, int line, const char *function, const
ast_dynamic_str_thread_set(&buf, BUFSIZ, &log_buf,
"[%s] %s[%ld] %s: ",
date, levels[level], (long)GETTID(), file);
- res = fprintf(chan->fileptr, "%s", buf->str);
+ res = fprintf(chan->fileptr, "%s", term_strip(buf->str, buf->str, strlen(buf->str) + 1));
if (res <= 0 && !ast_strlen_zero(buf->str)) { /* Error, no characters printed */
fprintf(stderr,"**** Asterisk Logging Error: ***********\n");
if (errno == ENOMEM || errno == ENOSPC) {