Revert "build: Rename E_LOGGING to E_DISABLE_LOGGING" 44/325644/1
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 13 Jun 2025 01:12:59 +0000 (10:12 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 13 Jun 2025 01:34:21 +0000 (10:34 +0900)
It turns out that some modules still use the E_LOGGING macro.
To fix the build break, this reverts commit
0821c4024a62628aadc5f975970484a92456c21e.

Change-Id: Ibcff0b7438959456b6555f5b0607093911d28e02

src/bin/meson.build
src/include/e_log.h
tests/meson.build

index 2823084620b76ddf37f64e54c0b4b592d86674ce..07d16b15af0dd5b1a314830723ac38fa14d82e46 100644 (file)
@@ -331,6 +331,9 @@ executable('enlightenment',
   e_sources,
   include_directories: e_inc,
   dependencies: deps_e,
+  c_args: [
+    '-DE_LOGGING=2',
+  ],
   link_args : '-rdynamic',
   install_dir: dir_bin,
   install : true,
index 75007a4af9ce99e7212d01add3fd0126333668cb..788ea373576ce83761a28e8c0276dbb9170a3b0a 100644 (file)
@@ -17,30 +17,7 @@ extern "C" {
 # define LOG_TAG "E20"
 #endif
 
-#ifdef E_DISABLE_LOGGING
-#undef DBG
-#undef INF
-#undef WRN
-#undef ERR
-#undef CRI
-#undef ELOG
-#undef ELOGF
-#define DBG(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } while(0)
-#define INF(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } while(0)
-#define WRN(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } while(0)
-#define ERR(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } while(0)
-#define CRI(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } while(0)
-#define ELOG(...)           ;
-#define ELOGF(...)          ;
-#define ICINF(f, x...)      ;
-
-#undef PRCTL
-#undef PRCTL_BACKTRACE
-#undef DLOG_BACKTRACE
-#define PRCTL
-#define PRCTL_BACKTRACE
-#define DLOG_BACKTRACE
-#else
+#ifdef E_LOGGING
 #undef DBG
 #undef INF
 #undef WRN
@@ -105,7 +82,8 @@ e_log_client_util_win_get(E_Client *ec)
    return e_pixmap_window_get(e_client_pixmap_get(ec));
 }
 
-#define ELOG(t, ec)                                       \
+# if (E_LOGGING >= 2) /* new version */
+#  define ELOG(t, ec)                                       \
    do                                                       \
      {                                                      \
         if (ec)                                             \
@@ -116,7 +94,7 @@ e_log_client_util_win_get(E_Client *ec)
      }                                                      \
    while (0)
 
-#define ELOGF(t, f, ec, x...)                             \
+#  define ELOGF(t, f, ec, x...)                             \
    do                                                       \
      {                                                      \
         if (ec)                                             \
@@ -127,7 +105,7 @@ e_log_client_util_win_get(E_Client *ec)
      }                                                      \
    while (0)
 
-#define ELOGFD(t, f, ec, x...)                            \
+#  define ELOGFD(t, f, ec, x...)                            \
    do                                                       \
      {                                                      \
         if (ec)                                             \
@@ -138,7 +116,7 @@ e_log_client_util_win_get(E_Client *ec)
      }                                                      \
    while (0)
 
-#define ELOGFE(t, f, ec, x...)                            \
+#  define ELOGFE(t, f, ec, x...)                            \
    do                                                       \
      {                                                      \
         if (ec)                                             \
@@ -148,8 +126,57 @@ e_log_client_util_win_get(E_Client *ec)
           ERR("%8.8s|||"f, (t), ##x);                        \
      }                                                      \
    while (0)
+# else /* old version */
+#  define ELOG(t, cp, ec)                                   \
+   do                                                       \
+     {                                                      \
+        if (ec)                                             \
+          INF("%10.10s|w:0x%08zx|ec:%8p|",                  \
+              (t), (e_log_client_util_win_get(ec)), (ec));      \
+        else                                                \
+          INF("%10.10s|            |             |",        \
+              (t));                                         \
+     }                                                      \
+   while (0)
+
+#  define ELOGF(t, f, cp, ec, x...)                         \
+   do                                                       \
+     {                                                      \
+        if (ec)                                             \
+          INF("%10.10s|w:0x%08zx|ec:%8p|"f,                 \
+              (t), (e_log_client_util_win_get(ec)), (ec), ##x); \
+        else                                                \
+          INF("%10.10s|            |             |"f,       \
+              (t), ##x);                                    \
+     }                                                      \
+   while (0)
+
+#  define ELOGFD(t, f, cp, ec, x...)                        \
+   do                                                       \
+     {                                                      \
+        if (ec)                                             \
+          DBG("%10.10s|w:0x%08zx|ec:%8p|"f,                 \
+              (t), (e_log_client_util_win_get(ec)), (ec), ##x); \
+        else                                                \
+          DBG("%10.10s|            |             |"f,       \
+              (t), ##x);                                    \
+     }                                                      \
+   while (0)
+
+#  define ELOGFE(t, f, cp, ec, x...)                        \
+   do                                                       \
+     {                                                      \
+        if (ec)                                             \
+          ERR("%10.10s|w:0x%08zx|ec:%8p|"f,                 \
+              (t), (e_log_client_util_win_get(ec)), (ec), ##x); \
+        else                                                \
+          ERR("%10.10s|            |             |"f,       \
+              (t), ##x);                                    \
+     }                                                      \
+   while (0)
+# endif /* end of if (E_LOGGING >= 2) */
 
-#define ICINF(f, x...)                                    \
+#  define ICINF(f, x...)                                    \
    do                                                       \
      {                                                      \
         E_Comp_Config *comp_conf = e_comp_config_get();     \
@@ -165,6 +192,30 @@ typedef enum _E_Log_Type
 } E_Log_Type;
 
 extern E_API int e_log_dom;
+
+#else
+#undef DBG
+#undef INF
+#undef WRN
+#undef ERR
+#undef CRI
+#undef ELOG
+#undef ELOGF
+#define DBG(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } while(0)
+#define INF(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } while(0)
+#define WRN(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } while(0)
+#define ERR(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } while(0)
+#define CRI(...)            do { printf(__VA_ARGS__); putc('\n', stdout); } while(0)
+#define ELOG(...)           ;
+#define ELOGF(...)          ;
+#define ICINF(f, x...)      ;
+
+#undef PRCTL
+#undef PRCTL_BACKTRACE
+#undef DLOG_BACKTRACE
+#define PRCTL
+#define PRCTL_BACKTRACE
+#define DLOG_BACKTRACE
 #endif
 
 #if 0
index 1179ff6fe2b23ede71efbe7387f8d6133ce6a4c5..44e6afcfb3b2bab841884ffb9092f5cd73a29dcc 100644 (file)
@@ -55,7 +55,6 @@ executable(
     '-DEFL_BETA_API_SUPPORT',
     '-DEFL_EO_API_SUPPORT',
     '-DE_VIEW_TEST',
-    '-DE_DISABLE_LOGGING',
   ],
   cpp_args: [
     '-DE_VIEW_TEST',