reactos/base/services/audiosrv/debug.c
Amine Khaldi c424146e2c Create a branch for cmake bringup.
svn path=/branches/cmake-bringup/; revision=48236
2010-07-24 18:52:44 +00:00

28 lines
552 B
C

/* Service debugging (simply logs to a file) */
#include <stdio.h>
#include <stdarg.h>
#include <windows.h>
void logmsg(char* string, ...)
{
va_list args;
FILE* debug_file = fopen("c:\\audiosrv-debug.txt", "a");
if (debug_file)
{
va_start(args, string);
vfprintf(debug_file, string, args);
va_end(args);
fclose(debug_file);
}
else
{
char buf[256];
va_start(args, string);
vsprintf(buf, string, args);
OutputDebugStringA(buf);
va_end(args);
}
}