[Freeswitch-svn] [commit] r9012 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Mon Jul 14 09:44:25 EDT 2008


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);
 				}



More information about the Freeswitch-svn mailing list