Moved logging defines to main logger.
This commit is contained in:
parent
7e3a1b3073
commit
6baf98dcda
@ -277,6 +277,21 @@ extern "C" {
|
||||
#define WLog_IsLevelActive(_log, _log_level) \
|
||||
(_log_level >= WLog_GetLogLevel(_log))
|
||||
|
||||
#define WLog_LVL(tag, lvl, fmt, ...) WLog_Print(WLog_Get(tag), lvl, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
#define WLog_VRB(tag, fmt, ...) WLog_Print(WLog_Get(tag), WLOG_TRACE, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
#define WLog_DBG(tag, fmt, ...) WLog_Print(WLog_Get(tag), WLOG_DEBUG, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
#define WLog_INFO(tag, fmt, ...) WLog_Print(WLog_Get(tag), WLOG_INFO, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
#define WLog_WARN(tag, fmt, ...) WLog_Print(WLog_Get(tag), WLOG_WARN, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
#define WLog_ERR(tag, fmt, ...) WLog_Print(WLog_Get(tag), WLOG_ERROR, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
#define WLog_FATAL(tag, fmt, ...) WLog_Print(WLog_Get(tag), WLOG_FATAL, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
|
||||
WINPR_API DWORD WLog_GetLogLevel(wLog *log);
|
||||
WINPR_API void WLog_SetLogLevel(wLog *log, DWORD logLevel);
|
||||
|
||||
|
@ -24,35 +24,4 @@
|
||||
|
||||
#define WINPR_TAG(tag) "com.winpr." tag
|
||||
|
||||
#define WLOG_PRINT(level, file, fkt, line, tag, fmt, ...) \
|
||||
do { \
|
||||
wLogMessage msg; \
|
||||
wLog *log; \
|
||||
\
|
||||
log = WLog_Get(tag); \
|
||||
\
|
||||
msg.Type = WLOG_MESSAGE_TEXT; \
|
||||
msg.Level = level; \
|
||||
msg.FormatString = fmt; \
|
||||
msg.LineNumber = line; \
|
||||
msg.FileName = file; \
|
||||
msg.FunctionName = fkt; \
|
||||
WLog_PrintMessage(log, &msg, ##__VA_ARGS__); \
|
||||
} while (0 )
|
||||
|
||||
#define WLog_LVL(tag, lvl, fmt, ...) WLOG_PRINT(lvl, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
#define WLog_VRB(tag, fmt, ...) WLOG_PRINT(WLOG_TRACE, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
#define WLog_DBG(tag, fmt, ...) WLOG_PRINT(WLOG_DEBUG, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
#define WLog_INFO(tag, fmt, ...) WLOG_PRINT(WLOG_INFO, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
#define WLog_WARN(tag, fmt, ...) WLOG_PRINT(WLOG_WARN, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
#define WLog_ERR(tag, fmt, ...) WLOG_PRINT(WLOG_ERROR, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
#define WLog_FATAL(tag, fmt, ...) WLOG_PRINT(WLOG_FATAL, __FILE__, __FUNCTION__, \
|
||||
__LINE__, tag, fmt, ## __VA_ARGS__)
|
||||
|
||||
#endif /* FREERDP_UTILS_DEBUG_H */
|
||||
|
Loading…
Reference in New Issue
Block a user