#include "tbm_bufmgr_int.h"
#include "tbm_log.h"
-#include <dlog.h>
#define TBM_PATH_LEN 1024
#define LOG_TAG "TBM"
#if ENABLE_DLOG
+#include <dlog.h>
static unsigned int dlog_enable = 1;
#else
+#include <stdarg.h>
static unsigned int dlog_enable = 0;
#endif
static unsigned int color_enable = 1;
va_end(arg);
}
+#if ENABLE_DLOG
static void
_tbm_log_dlog_print(int level, const char *fmt, va_list arg)
{
}
__dlog_vprint(LOG_ID_SYSTEM, dlog_prio, LOG_TAG, fmt, arg);
}
+#endif
void
tbm_log_print(int level, const char *fmt, ...)
if (level > tbm_log_debug_level)
return;
+#if ENABLE_DLOG
if (dlog_enable) {
va_start(arg, fmt);
_tbm_log_dlog_print(level, fmt, arg);
va_end(arg);
- } else {
+ }
+ else
+#endif
+ {
va_start(arg, fmt);
_tbm_log_vprint_stdout(level, fmt, arg);
va_end(arg);