Author: anthm Date: Mon Jul 14 09:44:25 2008 New Revision: 9012 Modified: freeswitch/trunk/src/switch_log.c Log: update Modified: freeswitch/trunk/src/switch_log.c ============================================================================== --- freeswitch/trunk/src/switch_log.c (original) +++ freeswitch/trunk/src/switch_log.c Mon Jul 14 09:44:25 2008 @@ -331,7 +331,14 @@ #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); }
participants (1)
-
Freeswitch SVN