git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9012 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-07-14 13:44:25 +00:00
parent a358cf8e24
commit 97dad7b353
1 changed files with 7 additions and 0 deletions

View File

@ -331,7 +331,14 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, const char
#endif
if (aok) {
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);
#endif
} else {
fprintf(handle, "%s", data);
}