build: Rename E_LOGGING to E_DISABLE_LOGGING 61/325561/1
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 12 Jun 2025 02:59:37 +0000 (11:59 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 12 Jun 2025 04:06:46 +0000 (13:06 +0900)
This commit renames E_LOGGING to E_DISABLE_LOGGING to ensure that
logging is enabled by default and can be disabled only if a specific
module requires it.

Change-Id: Ie0b1463b11f2d5e953f0cf30692d424bd5a776a8

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

index b47491466e644a41f04126a4913fbe4c2b05ea7d..47115204e21e248c116283da6c737c6618e053dc 100644 (file)
@@ -318,9 +318,6 @@ 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 788ea373576ce83761a28e8c0276dbb9170a3b0a..75007a4af9ce99e7212d01add3fd0126333668cb 100644 (file)
@@ -17,7 +17,30 @@ extern "C" {
 # define LOG_TAG "E20"
 #endif
 
-#ifdef E_LOGGING
+#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
 #undef DBG
 #undef INF
 #undef WRN
@@ -82,8 +105,7 @@ e_log_client_util_win_get(E_Client *ec)
    return e_pixmap_window_get(e_client_pixmap_get(ec));
 }
 
-# if (E_LOGGING >= 2) /* new version */
-#  define ELOG(t, ec)                                       \
+#define ELOG(t, ec)                                       \
    do                                                       \
      {                                                      \
         if (ec)                                             \
@@ -94,7 +116,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)                                             \
@@ -105,7 +127,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)                                             \
@@ -116,7 +138,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)                                             \
@@ -126,57 +148,8 @@ 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();     \
@@ -192,30 +165,6 @@ 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 9447a8192d46296d1f498e9b3923e821a052e24f..deb1d7c23001f7b34e6b92e32ae679848dec5112 100644 (file)
@@ -49,6 +49,7 @@ executable(
     '-DEFL_BETA_API_SUPPORT',
     '-DEFL_EO_API_SUPPORT',
     '-DE_VIEW_TEST',
+    '-DE_DISABLE_LOGGING',
   ],
   cpp_args: [
     '-DE_VIEW_TEST',