提交 97dad7b3 authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9012 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 a358cf8e
...@@ -331,7 +331,14 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, const char ...@@ -331,7 +331,14 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, const char
#endif #endif
if (aok) { if (aok) {
if (COLORIZE) { if (COLORIZE) {
#ifdef WIN32
SetConsoleTextAttribute(hStdout, COLORS[node->level]);
WriteFile(hStdout, node->data, (DWORD) strlen(node->data), NULL, NULL);
SetConsoleTextAttribute(hStdout, wOldColorAttrs);
#else
fprintf(handle, "%s%s%s", COLORS[level], data, SWITCH_SEQ_DEFAULT_COLOR); fprintf(handle, "%s%s%s", COLORS[level], data, SWITCH_SEQ_DEFAULT_COLOR);
#endif
} else { } else {
fprintf(handle, "%s", data); fprintf(handle, "%s", data);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论