build tweaks for msvc

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9014 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-07-14 14:55:03 +00:00
parent fb3a1cf12d
commit b55bd6370e
2 changed files with 12 additions and 10 deletions

View File

@@ -259,6 +259,8 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, const char
return;
}
switch_assert(level < SWITCH_LOG_INVALID);
va_start(ap, fmt);
handle = switch_core_data_channel(channel);
@@ -333,8 +335,8 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, const char
if (COLORIZE) {
#ifdef WIN32
SetConsoleTextAttribute(hStdout, COLORS[node->level]);
WriteFile(hStdout, node->data, (DWORD) strlen(node->data), NULL, NULL);
SetConsoleTextAttribute(hStdout, COLORS[level]);
WriteFile(hStdout, data, (DWORD) strlen(data), NULL, NULL);
SetConsoleTextAttribute(hStdout, wOldColorAttrs);
#else
fprintf(handle, "%s%s%s", COLORS[level], data, SWITCH_SEQ_DEFAULT_COLOR);