From: Seunghun Lee Date: Fri, 13 Jun 2025 01:12:59 +0000 (+0900) Subject: Revert "build: Rename E_LOGGING to E_DISABLE_LOGGING" X-Git-Tag: accepted/tizen/unified/20250614.044607~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=782b7872aec778dd0a11f7da71069d6ac57b1b98;p=platform%2Fupstream%2Fenlightenment.git Revert "build: Rename E_LOGGING to E_DISABLE_LOGGING" It turns out that some modules still use the E_LOGGING macro. To fix the build break, this reverts commit 0821c4024a62628aadc5f975970484a92456c21e. Change-Id: Ibcff0b7438959456b6555f5b0607093911d28e02 --- diff --git a/src/bin/meson.build b/src/bin/meson.build index 2823084620..07d16b15af 100644 --- a/src/bin/meson.build +++ b/src/bin/meson.build @@ -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, diff --git a/src/include/e_log.h b/src/include/e_log.h index 75007a4af9..788ea37357 100644 --- a/src/include/e_log.h +++ b/src/include/e_log.h @@ -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 diff --git a/tests/meson.build b/tests/meson.build index 1179ff6fe2..44e6afcfb3 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -55,7 +55,6 @@ executable( '-DEFL_BETA_API_SUPPORT', '-DEFL_EO_API_SUPPORT', '-DE_VIEW_TEST', - '-DE_DISABLE_LOGGING', ], cpp_args: [ '-DE_VIEW_TEST',