2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
18#ifndef GIMBAL_LOGGER_H
19#define GIMBAL_LOGGER_H
22#include "../meta/instances/gimbal_object.h"
23#include "../containers/gimbal_linked_list.h"
26
27
28
30#define GBL_LOGGER(self) (GBL_CAST(GblLogger, self))
32#define GBL_LOGGER_GET_CLASS(self) (GBL_CLASSOF(GblLogger, self))
36
37
38
39#define GBL_LOG_WRITE(flags, domain, ...) GblLogger_write(__FILE__, __func__, __LINE__,
40 domain, flags, __VA_ARGS__)
46#define GBL_LOG_PUSH() GblLogger_push()
47#define GBL_LOG_POP(n) GblLogger_pop(n)
50#define GBL_SELF_TYPE GblLogger
57typedef GblBool (*GblLoggerIterFn)(GblLogger* pLogger,
void* pClosure);
61 GBL_LOG_REENTRANT = 0x1,
63 GBL_LOG_VERBOSE = 0x4,
71
72
73
74
75
76
77
78
79
80
85 const char* pFunction,
103
104
105
106
107
108
109
110
111
112
116 GblLinkedListNode listNode;
144GBL_EXPORT GBL_RESULT GblLogger_write (
const char* pFile,
145 const char* pFunction,
152GBL_EXPORT GBL_RESULT GblLogger_writeVa (
const char* pFile,
153 const char* pFunction,
171 const GblThd* pThread,
#define GBL_CLASS_CAST(cType, klass)
#define GBL_FORWARD_DECLARE_STRUCT(S)
#define GBL_TYPEID(instanceStruct)
#define GBL_INSTANCE_DERIVE(derivedInstance, baseInstance)
#define GBL_PRIVATE_BEGIN
#define GBL_CLASS_DERIVE(...)
#define GBL_DECLARE_FLAGS(F)
#define GBL_PRIVATE_END
Private data structure.
#define GBL_FLAGS_TYPE
GblType UUID for flags.
#define GBL_CLASSOF(cType, self)
#define GBL_CAST(cType, self)
#define GBL_LOG_ERROR(domain,...)
Writes to log with GBL_LOG_ERROR.
#define GBL_LOG_WRITE(flags, domain,...)
Generalized log write operation/*#end#*/.
#define GBL_LOG_INFO(domain,...)
Writes to log with GBL_LOG_INFO.
#define GBL_LOG_DEBUG(domain,...)
Writes to log with GBL_LOG_DEBUG.
#define GBL_LOG_VERBOSE(domain,...)
Writes to log with GBL_LOG_VERBOSE.
#define GBL_LOG_WARN(domain,...)
Writes to log with GBL_LOG_WARN.
#define GBL_PROPERTIES(object,...)
Declares a list of properties for the given object/instance structure.
uint32_t GblFlags
Standard-sized flags type, 32-bits across platforms.
uint8_t GblBool
Basic boolean type, standardized to sizeof(char)
uint16_t GblRefCount
Type able to hold a reference counter across the codebase.