]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Remove color code sequences from verbose messages that go to logfiles.
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 24 Feb 2010 21:02:18 +0000 (21:02 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 24 Feb 2010 21:02:18 +0000 (21:02 +0000)
(closes issue #16786)
 Reported by: dodo
 Patches:
       logger2.patch uploaded by dodo (license 989)
 Tested by: tilghman

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@248582 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/logger.c

index e1913eed30a9490c1ca9846685cf49131429aedb..99ab0b288b110746281a024353e627159b813c6d 100644 (file)
@@ -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) {