summaryrefslogtreecommitdiffstats
path: root/libcsoap/csoaplog.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcsoap/csoaplog.c')
-rw-r--r--libcsoap/csoaplog.c65
1 files changed, 65 insertions, 0 deletions
diff --git a/libcsoap/csoaplog.c b/libcsoap/csoaplog.c
new file mode 100644
index 0000000..3d5b127
--- /dev/null
+++ b/libcsoap/csoaplog.c
@@ -0,0 +1,65 @@
+#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);
+}
+
+