aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/basetypes/MCLog.h
blob: b84a21822ad95e7b9012f0f72c02d877c9da8216 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef __MAILCORE_MCLOG_H_

#define __MAILCORE_MCLOG_H_

#include <stdio.h>

#ifdef __cplusplus

#define MCLog(...) mailcore::logInternal(NULL, __FILE__, __LINE__, 0, __VA_ARGS__)

namespace mailcore {
    
    extern bool logEnabled;
    
#ifndef __printflike
#define __printflike(a,b)
#endif

    void logInternal(const char * user,
                     const char * filename,
                     unsigned int line,
                     int dumpStack,
                     const char * format, ...) __printflike(5, 6);
    
}

#endif

#endif