diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-02-24 21:17:26 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-02-24 21:17:26 +0000 |
commit | 4e1e6820dbf1744df641cd88293c502584b5d4df (patch) | |
tree | edc9f76f97123c6237db4a6a04575935b6dc4018 /main/logger.c | |
parent | e3d176d0d36ef915bf2286c2d01202c906a7aa1a (diff) |
Merged revisions 248582 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r248582 | tilghman | 2010-02-24 15:02:18 -0600 (Wed, 24 Feb 2010) | 7 lines
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: https://origsvn.digium.com/svn/asterisk/trunk@248584 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/logger.c')
-rw-r--r-- | main/logger.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/main/logger.c b/main/logger.c index 5dbceebaa..15ec7825a 100644 --- a/main/logger.c +++ b/main/logger.c @@ -832,12 +832,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, logmsg->level_name, logmsg->process_id, logmsg->file, logmsg->message); + logmsg->date, logmsg->level_name, logmsg->process_id, logmsg->file, term_strip(buf, logmsg->message, BUFSIZ)); if (res <= 0 && !ast_strlen_zero(logmsg->message)) { fprintf(stderr, "**** Asterisk Logging Error: ***********\n"); if (errno == ENOMEM || errno == ENOSPC) |