72 #define DASLOG_NOTHING 255
73 #define DASLOG_CRIT 100
74 #define DASLOG_ERROR 80
75 #define DASLOG_WARN 60
76 #define DASLOG_INFO 40
77 #define DASLOG_DEBUG 20
78 #define DASLOG_TRACE 0
107 void daslog(
int nLevel,
const char* sSrcFile,
int nLine,
const char* sFmt, ...);
111 #define daslog_trace(M) daslog(DASLOG_TRACE, __FILE__, __LINE__, M)
113 #define daslog_debug(M) daslog(DASLOG_DEBUG, __FILE__, __LINE__, M)
115 #define daslog_info(M) daslog(DASLOG_INFO, __FILE__, __LINE__, M)
117 #define daslog_warn(M) daslog(DASLOG_WARN, __FILE__, __LINE__, M)
119 #define daslog_error(M) daslog(DASLOG_ERROR, __FILE__, __LINE__, M)
121 #define daslog_critical(M) daslog(DAS_LL_CRITICAL, __FILE__, __LINE__, M)
125 #define daslog_trace_v(F, ...)\
126 daslog(DASLOG_TRACE, __FILE__, __LINE__, F, __VA_ARGS__)
128 #define daslog_debug_v(F, ...)\
129 daslog(DASLOG_DEBUG, __FILE__, __LINE__, F, __VA_ARGS__)
131 #define daslog_info_v(F, ...)\
132 daslog(DASLOG_INFO, __FILE__, __LINE__, F, __VA_ARGS__)
134 #define daslog_warn_v(F, ...)\
135 daslog(DASLOG_WARN, __FILE__, __LINE__, F, __VA_ARGS__)
137 #define daslog_error_v(F, ...)\
138 daslog(DASLOG_ERROR, __FILE__, __LINE__, F, __VA_ARGS__)
140 #define daslog_critical_v(F, ...)\
141 daslog(DASLOG_CRIT, __FILE__, __LINE__, F, __VA_ARGS__)
void(* das_log_handler_t)(int nLevel, const char *sMsg, bool bPrnTime)
Definition of a message handler function pointer.
Definition: util.h:143
int daslog_level(void)
Get the log level.
bool daslog_set_showline(int nLevel)
Output source file and line numbers for messages at or above this level.
int daslog_setlevel(int nLevel)
Set the logging level for this thread.
das_log_handler_t daslog_sethandler(das_log_handler_t new_handler)
Install a new message handler function for this thread.