diff options
author | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-01-24 00:29:50 +0000 |
---|---|---|
committer | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-01-24 00:29:50 +0000 |
commit | be94a568ef65120465b49f5c6db90cd4ec3c3eb2 (patch) | |
tree | fe7fc014fe1053e821860c53f78e4cabb95b9ac7 /Plugins/utils/mir_log.cpp | |
parent | 52e0dac49837ca1123412fccd95fdb95873c8321 (diff) |
utils: sync with BerliOS
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@132 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/utils/mir_log.cpp')
-rw-r--r-- | Plugins/utils/mir_log.cpp | 28 |
1 files changed, 21 insertions, 7 deletions
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 <stdio.h>
-extern "C"
-{
#include <newpluginapi.h>
#include <m_netlib.h>
#include <m_protocols.h>
#include <m_clist.h>
-}
+#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
|