diff options
author | snowdrop | 2003-03-25 22:14:36 +0000 |
---|---|---|
committer | snowdrop | 2003-03-25 22:14:36 +0000 |
commit | 4ab669f746bdfe4e32837be8e16b761c0490e21c (patch) | |
tree | b69e693b2695a139d97b55ab22a633c39bde862d /src/csoaplog.c | |
download | csoap-4ab669f746bdfe4e32837be8e16b761c0490e21c.tar.gz csoap-4ab669f746bdfe4e32837be8e16b761c0490e21c.tar.bz2 |
initial import
Diffstat (limited to 'src/csoaplog.c')
-rw-r--r-- | src/csoaplog.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/csoaplog.c b/src/csoaplog.c new file mode 100644 index 0000000..536d1a9 --- /dev/null +++ b/src/csoaplog.c @@ -0,0 +1,65 @@ +#include "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); +} + + |