Delete TIZEN_ENGINEER_MODE 44/58844/2 accepted/tizen/common/20160302.193230 accepted/tizen/ivi/20160302.002927 accepted/tizen/mobile/20160302.002835 accepted/tizen/tv/20160302.002853 accepted/tizen/wearable/20160302.002912 submit/tizen/20160229.023827
authorKichan Kwon <k_c.kwon@samsung.com>
Thu, 4 Feb 2016 02:47:59 +0000 (11:47 +0900)
committerKichan Kwon <k_c.kwon@samsung.com>
Mon, 22 Feb 2016 03:51:45 +0000 (12:51 +0900)
 - It just turns on DLOG_DEBUG_ENABLE

 - Instead, spec file turns on DLOG_DEBUG_ENABLE directly

 - Accordingly, engineer_mode is renamed to dlog_debug_mode

Change-Id: I4f90a604171f1cb41a5867779e1c209a34f2a55b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
configure.ac
include/dlog-internal.h
packaging/dlog.spec

index 4a74157..124f3a1 100755 (executable)
@@ -37,13 +37,13 @@ if test "x$have_systemd_journal" = "xyes" ; then
 fi
 AC_SUBST(systemd_journal)
 
-# check binary type for tizen engineer mode
-AC_ARG_ENABLE([engineer_mode],
-       AS_HELP_STRING([--enable-engineer_mode Turn on engineer_mode]),
-               [engineer_mode=yes],
-               engineer_mode=no)
-if test "x$engineer_mode" = "xyes" ; then
-       DEBUG_CFLAGS+=" -DTIZEN_ENGINEER_MODE"
+# check binary type for dlog debug mode
+AC_ARG_ENABLE([dlog_debug_mode],
+       AS_HELP_STRING([--enable-debug_mode Turn on dlog_debug_mode]),
+               [dlog_debug_mode=yes],
+               dlog_debug_mode=no)
+if test "x$dlog_debug_mode" = "xyes" ; then
+       DEBUG_CFLAGS+=" -DDLOG_DEBUG_ENABLE"
 fi
 AC_ARG_ENABLE([debug_enable],
        AS_HELP_STRING([--enable-debug_enable Turn on debug_enable]),
index f0ff5b5..585b842 100755 (executable)
@@ -45,12 +45,6 @@ extern "C" {
 #define __MODULE__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
 #endif
 
-#ifdef TIZEN_ENGINEER_MODE
-#ifndef DLOG_DEBUG_ENABLE
-#define DLOG_DEBUG_ENABLE
-#endif
-#endif
-
 /**
  * @internal
  * @brief log id
@@ -71,29 +65,17 @@ static inline int __dlog_no_print(const char *fmt __attribute__((unused)), ...)
 
 // Macro inner work---------------------------------------------------------------
 #undef LOG_
-#ifdef DLOG_DEBUG_ENABLE
 #define LOG_(id, prio, tag, fmt, arg...) \
        ({ do { \
                __dlog_print(id, prio, tag, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, ##arg); \
        } while (0); })
-#else
-#define LOG_(id, prio, tag, fmt, arg...) \
-       ({ do { \
-               if ((int)prio != DLOG_DEBUG) { \
-                       __dlog_print(id, prio, tag, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, ##arg); \
-               } \
-       } while (0); })
-#endif
 
 #undef SECURE_LOG_
-#ifdef DLOG_DEBUG_ENABLE
 #define SECURE_LOG_(id, prio, tag, fmt, arg...) \
        ({ do { \
                __dlog_print(id, prio, tag, "%s: %s(%d) > [SECURE_LOG] " fmt, __MODULE__, __func__, __LINE__, ##arg); \
        } while (0); })
-#else
-#define SECURE_LOG_(id, prio, tag, fmt, arg...) NOP(fmt, ##arg)
-#endif
+
 // ---------------------------------------------------------------------
 /**
  * @internal
@@ -168,11 +150,7 @@ static inline int __dlog_no_print(const char *fmt __attribute__((unused)), ...)
  *  LOGD("app debug %d", num);
  *  LOGE("app error %d", num);
  */
-#ifdef DLOG_DEBUG_ENABLE
 #define LOGD(format, arg...) LOG_(LOG_ID_MAIN, DLOG_DEBUG, LOG_TAG, format, ##arg)
-#else
-#define LOGD(format, arg...) NOP(format, ##arg)
-#endif
 #define LOGI(format, arg...) LOG_(LOG_ID_MAIN, DLOG_INFO, LOG_TAG, format, ##arg)
 #define LOGW(format, arg...) LOG_(LOG_ID_MAIN, DLOG_WARN, LOG_TAG, format, ##arg)
 #define LOGE(format, arg...) LOG_(LOG_ID_MAIN, DLOG_ERROR, LOG_TAG, format, ##arg)
@@ -185,11 +163,7 @@ static inline int __dlog_no_print(const char *fmt __attribute__((unused)), ...)
  *  SLOGD("system debug %d", num);
  *  SLOGE("system error %d", num);
  */
-#ifdef DLOG_DEBUG_ENABLE
 #define SLOGD(format, arg...) LOG_(LOG_ID_SYSTEM, DLOG_DEBUG, LOG_TAG, format, ##arg)
-#else
-#define SLOGD(format, arg...) NOP(format, ##arg)
-#endif
 #define SLOGI(format, arg...) LOG_(LOG_ID_SYSTEM, DLOG_INFO, LOG_TAG, format, ##arg)
 #define SLOGW(format, arg...) LOG_(LOG_ID_SYSTEM, DLOG_WARN, LOG_TAG, format, ##arg)
 #define SLOGE(format, arg...) LOG_(LOG_ID_SYSTEM, DLOG_ERROR, LOG_TAG, format, ##arg)
@@ -202,11 +176,7 @@ static inline int __dlog_no_print(const char *fmt __attribute__((unused)), ...)
  *  RLOGD("radio debug %d", num);
  *  RLOGE("radio error %d", num);
  */
-#ifdef DLOG_DEBUG_ENABLE
 #define RLOGD(format, arg...) LOG_(LOG_ID_RADIO, DLOG_DEBUG, LOG_TAG, format, ##arg)
-#else
-#define RLOGD(format, arg...) NOP(format, ##arg)
-#endif
 #define RLOGI(format, arg...) LOG_(LOG_ID_RADIO, DLOG_INFO, LOG_TAG, format, ##arg)
 #define RLOGW(format, arg...) LOG_(LOG_ID_RADIO, DLOG_WARN, LOG_TAG, format, ##arg)
 #define RLOGE(format, arg...) LOG_(LOG_ID_RADIO, DLOG_ERROR, LOG_TAG, format, ##arg)
@@ -215,11 +185,7 @@ static inline int __dlog_no_print(const char *fmt __attribute__((unused)), ...)
  * @internal
  * @brief For Tizen OSP Application macro.
  */
-#ifdef DLOG_DEBUG_ENABLE
 #define ALOGD(format, arg...) LOG_(LOG_ID_APPS, DLOG_DEBUG, LOG_TAG, format, ##arg)
-#else
-#define ALOGD(format, arg...) NOP(format, ##arg)
-#endif
 #define ALOGI(format, arg...) LOG_(LOG_ID_APPS, DLOG_INFO, LOG_TAG, format, ##arg)
 #define ALOGW(format, arg...) LOG_(LOG_ID_APPS, DLOG_WARN, LOG_TAG, format, ##arg)
 #define ALOGE(format, arg...) LOG_(LOG_ID_APPS, DLOG_ERROR, LOG_TAG, format, ##arg)
index 5c26f4d..935cb67 100755 (executable)
@@ -88,7 +88,7 @@ cp %{SOURCE102} .
                %if %{?backend_journal} == ON
                        --enable-journal \
                %endif
-                       --enable-engineer_mode
+                       --enable-debug_mode
 make %{?jobs:-j%jobs} \
        CFLAGS+=-DKMSG_DEV_CONFIG_FILE=\\\"/run/dloginit.conf\\\" \
 %if %{?backend_journal} == ON