Sync with trunk r63283
[reactos.git] / base / services / audiosrv / debug.c
1 /* Service debugging (simply logs to a file) */
2
3 #include "audiosrv.h"
4
5 #include <stdio.h>
6
7 void logmsg(char* string, ...)
8 {
9 va_list args;
10
11 FILE* debug_file = fopen("c:\\audiosrv-debug.txt", "a");
12
13 if (debug_file)
14 {
15 va_start(args, string);
16 vfprintf(debug_file, string, args);
17 va_end(args);
18 fclose(debug_file);
19 }
20 else
21 {
22 char buf[256];
23 va_start(args, string);
24 vsprintf(buf, string, args);
25 OutputDebugStringA(buf);
26 va_end(args);
27 }
28 }