mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 03:04:19 +00:00
Merged revisions 248584 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r248584 | tilghman | 2010-02-24 15:17:26 -0600 (Wed, 24 Feb 2010) | 14 lines 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/branches/1.6.1@248641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -905,12 +905,13 @@ static void logger_print_normal(struct logmsg *logmsg)
|
|||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
/* If no file pointer exists, skip it */
|
/* If no file pointer exists, skip it */
|
||||||
if (!chan->fileptr)
|
if (!chan->fileptr) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Print out to the file */
|
/* Print out to the file */
|
||||||
res = fprintf(chan->fileptr, "[%s] %s[%ld] %s: %s",
|
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)) {
|
if (res <= 0 && !ast_strlen_zero(logmsg->str)) {
|
||||||
fprintf(stderr, "**** Asterisk Logging Error: ***********\n");
|
fprintf(stderr, "**** Asterisk Logging Error: ***********\n");
|
||||||
if (errno == ENOMEM || errno == ENOSPC)
|
if (errno == ENOMEM || errno == ENOSPC)
|
||||||
|
|||||||
Reference in New Issue
Block a user