diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-12 21:55:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-12 21:55:48 +0000 |
commit | 9f06e7ffdd6458dd25bfd5b915cb788bab03bea0 (patch) | |
tree | 28acaca0e311896ee60299e4ca055a5cc7a5cb3a /include/m_core.h | |
parent | d60f928fe512a067719cfc6e9a88eb9d56ad47ac (diff) |
simple core logger
git-svn-id: http://svn.miranda-ng.org/main/trunk@5664 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_core.h')
-rw-r--r-- | include/m_core.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/m_core.h b/include/m_core.h index 9c4461b407..a800afe873 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -521,6 +521,17 @@ MIR_CORE_DLL(void) List_Copy(SortedList* s, SortedList* d, size_t itemSiz MIR_CORE_DLL(void) List_ObjCopy(SortedList* s, SortedList* d, size_t itemSize);
///////////////////////////////////////////////////////////////////////////////
+// logging functions
+
+MIR_CORE_DLL(HANDLE) mir_createLog(const TCHAR *ptszFile, unsigned options);
+
+MIR_C_CORE_DLL(int) mir_writeLogA(HANDLE logger, const char *format, ...);
+MIR_C_CORE_DLL(int) mir_writeLogW(HANDLE logger, const WCHAR *format, ...);
+
+MIR_CORE_DLL(int) mir_writeLogVA(HANDLE logger, const char *format, va_list args);
+MIR_CORE_DLL(int) mir_writeLogVW(HANDLE logger, const WCHAR *format, va_list args);
+
+///////////////////////////////////////////////////////////////////////////////
// md5 functions
/* Define the state of the MD5 Algorithm. */
@@ -719,6 +730,9 @@ __forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); }; #define mir_sntprintf mir_snwprintf
#define mir_vsntprintf mir_vsnwprintf
+
+ #define mir_writeLogT mir_writeLogW
+ #define mir_writeLogVT mir_writeLogVW
#else
#define mir_t2a(s) mir_strdup(s)
#define mir_a2t(s) mir_strdup(s)
@@ -743,6 +757,9 @@ __forceinline char* lrtrimp(char *str) { return ltrimp(rtrim(str)); }; #define mir_sntprintf mir_snprintf
#define mir_vsntprintf mir_vsnprintf
+
+ #define mir_writeLogT mir_writeLogA
+ #define mir_writeLogVT mir_writeLogVA
#endif
MIR_CORE_DLL(WCHAR*) mir_a2u_cp(const char* src, int codepage);
|