1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#include "libcsoap/csoaplog.h"
#include <stdarg.h>
#include <stdio.h>
static
void _SoapLogWrite(SoapLogLevel level,
const char* function,
const char* format,
va_list ap)
{
/*
char buffer[1054];
char buffer2[1054];
sprintf(buffer, "[%s] [%d] %s\n", function, level, format);
vsprintf(buffer2, buffer, ap);
printf(buffer2);
fflush(stdout);
*/
}
void SoapTraceEnter(const char* function,
const char* format, ...)
{
va_list ap;
va_start(ap, format);
_SoapLogWrite(LOG_TRACE, function, format, ap);
va_end(ap);
}
void SoapTraceLeave(const char* function,
const char* format, ...)
{
va_list ap;
va_start(ap, format);
_SoapLogWrite(LOG_TRACE, function, format, ap);
va_end(ap);
}
void SoapTraceLeaveWithError(const char* function,
const char* format, ...)
{
va_list ap;
va_start(ap, format);
_SoapLogWrite(LOG_ERROR, function, format, ap);
va_end(ap);
}
void SoapLog(SoapLogLevel level, const char* function,
const char* format, ...)
{
va_list ap;
va_start(ap, format);
_SoapLogWrite(level, function, format, ap);
va_end(ap);
}
|