From be94a568ef65120465b49f5c6db90cd4ec3c3eb2 Mon Sep 17 00:00:00 2001 From: pescuma Date: Sat, 24 Jan 2009 00:29:50 +0000 Subject: utils: sync with BerliOS git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@132 c086bb3d-8645-0410-b8da-73a8550f86e7 --- Plugins/utils/mir_log.cpp | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'Plugins/utils/mir_log.cpp') diff --git a/Plugins/utils/mir_log.cpp b/Plugins/utils/mir_log.cpp index b842bb1..c469c20 100644 --- a/Plugins/utils/mir_log.cpp +++ b/Plugins/utils/mir_log.cpp @@ -22,20 +22,23 @@ Boston, MA 02111-1307, USA. #include -extern "C" -{ #include #include #include #include -} +#define ENABLE_LOG -int mlog(const char *module, const char *function, const char *fmt, ...) + +int MLog::deep = 0; + + + + +int mlog(const char *module, const char *function, const char *fmt, va_list va) { #ifdef ENABLE_LOG - va_list va; char text[1024]; size_t len; @@ -43,9 +46,7 @@ int mlog(const char *module, const char *function, const char *fmt, ...) GetCurrentThreadId(), GetTickCount(), module, function); len = strlen(text); - va_start(va, fmt); mir_vsnprintf(&text[len], sizeof(text) - len, fmt, va); - va_end(va); #ifdef LOG_TO_NETLIB @@ -77,6 +78,19 @@ int mlog(const char *module, const char *function, const char *fmt, ...) #endif } + +int mlog(const char *module, const char *function, const char *fmt, ...) +{ + va_list va; + va_start(va, fmt); + + int ret = mlog(module, function, fmt, va); + + va_end(va); + + return ret; +} + int mlogC(const char *module, const char *function, HANDLE hContact, const char *fmt, ...) { #ifdef ENABLE_LOG -- cgit v1.2.3