20 #ifndef WINPR_WLOG_PRIVATE_H
21 #define WINPR_WLOG_PRIVATE_H
23 #include <winpr/wlog.h>
25 #define WLOG_MAX_PREFIX_SIZE 512
26 #define WLOG_MAX_STRING_SIZE 8192
28 typedef BOOL (*WLOG_APPENDER_OPEN_FN)(wLog* log, wLogAppender* appender);
29 typedef BOOL (*WLOG_APPENDER_CLOSE_FN)(wLog* log, wLogAppender* appender);
30 typedef BOOL (*WLOG_APPENDER_WRITE_MESSAGE_FN)(wLog* log, wLogAppender* appender,
32 typedef BOOL (*WLOG_APPENDER_WRITE_DATA_MESSAGE_FN)(wLog* log, wLogAppender* appender,
34 typedef BOOL (*WLOG_APPENDER_WRITE_IMAGE_MESSAGE_FN)(wLog* log, wLogAppender* appender,
36 typedef BOOL (*WLOG_APPENDER_WRITE_PACKET_MESSAGE_FN)(wLog* log, wLogAppender* appender,
38 typedef BOOL (*WLOG_APPENDER_SET)(wLogAppender* appender,
const char* setting,
void* value);
39 typedef void (*WLOG_APPENDER_FREE)(wLogAppender* appender);
41 #define WLOG_APPENDER_COMMON() \
45 CRITICAL_SECTION lock; \
47 void* TextMessageContext; \
48 void* DataMessageContext; \
49 void* ImageMessageContext; \
50 void* PacketMessageContext; \
51 WLOG_APPENDER_OPEN_FN Open; \
52 WLOG_APPENDER_CLOSE_FN Close; \
53 WLOG_APPENDER_WRITE_MESSAGE_FN WriteMessage; \
54 WLOG_APPENDER_WRITE_DATA_MESSAGE_FN WriteDataMessage; \
55 WLOG_APPENDER_WRITE_IMAGE_MESSAGE_FN WriteImageMessage; \
56 WLOG_APPENDER_WRITE_PACKET_MESSAGE_FN WritePacketMessage; \
57 WLOG_APPENDER_FREE Free; \
62 WLOG_APPENDER_COMMON();
75 wLogAppender* Appender;
82 const char* (*custom)(
void*);
86 extern const char* WLOG_LEVELS[7];
87 BOOL WLog_Layout_GetMessagePrefix(wLog* log, wLogLayout* layout,
wLogMessage* message);