-I$(top_builddir)/src/bin/displaymgr/video \
-I$(top_builddir)/src/bin/utils \
-I$(top_builddir)/src/bin/debug \
+-I$(top_builddir)/src/bin/log \
-I$(top_srcdir) \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/bin/displaymgr/video \
-I$(top_srcdir)/src/bin/utils \
-I$(top_srcdir)/src/bin/debug \
+-I$(top_srcdir)/src/bin/log \
@e_cflags@ \
@cf_cflags@ \
@VALGRIND_CFLAGS@ \
src/bin/utils/e_msg.c \
src/bin/utils/e_map.c \
src/bin/utils/e_util_video.c \
-src/bin/debug/e_error.c \
src/bin/debug/e_info_server.c \
-src/bin/debug/e_log.c \
src/bin/debug/e_test_helper.c \
src/bin/debug/e_info_protocol.c \
src/bin/debug/e_info_server_input.c \
-src/bin/debug/e_video_debug.c
+src/bin/log/e_error.c \
+src/bin/log/e_log.c \
+src/bin/log/e_video_debug.c
src_bin_enlightenment_CPPFLAGS = $(E_CPPFLAGS) -DEFL_BETA_API_SUPPORT -DEFL_EO_API_SUPPORT -DE_LOGGING=2 @WAYLAND_CFLAGS@ $(TTRACE_CFLAGS) $(DLOG_CFLAGS) $(PIXMAN_CFLAGS) $(POLICY_CFLAGS) $(EGL_CFLAGS)
if HAVE_LIBGOMP
+++ /dev/null
-#include "e_error_intern.h"
-
-/* local subsystem functions */
-
-/* local subsystem globals */
-
-/* externally accessible functions */
-EINTERN void
-e_error_message_show_internal(char *txt)
-{
- ELOGF("E ERROR", "%s", NULL, txt);
-}
-
-/* local subsystem functions */
+++ /dev/null
-#ifndef E_ERROR_INTERN_H
-#define E_ERROR_INTERN_H
-
-#include "e_intern.h"
-
-#define e_error_message_show(args...) do \
-{ \
- char __tmpbuf[4096]; \
- \
- snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
- e_error_message_show_internal(__tmpbuf); \
-} while (0)
-
-EINTERN void e_error_message_show_internal(char *txt);
-
-#endif
+++ /dev/null
-#ifndef E_INPUT_PRIVIATES_H
-#define E_INPUT_PRIVIATES_H
-
-#ifdef DBG
-# undef DBG
-#endif
-
-#ifdef INF
-# undef INF
-#endif
-
-#ifdef ERR
-# undef ERR
-#endif
-
-extern int _e_input_log_dom;
-#define DBG(...) EINA_LOG_DOM_DBG(_e_input_log_dom, __VA_ARGS__)
-#define INF(...) EINA_LOG_DOM_INFO(_e_input_log_dom, __VA_ARGS__)
-#define ERR(...) EINA_LOG_DOM_ERR(_e_input_log_dom, __VA_ARGS__)
-
-#define EIERR(msg, ARG...) ERR("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-#define EIINF(msg, ARG...) INF("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-#define EIDBG(msg, ARG...) DBG("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-
-#define DMERR(msg, ARG...) ERR("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-#define DMWRN(msg, ARG...) WRN("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-#define DMINF(msg, ARG...) INF("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-#define DMDBG(msg, ARG...) DBG("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
-
-#endif
+++ /dev/null
-#include "e_log_intern.h"
-#include <Ecore_File.h>
-
-E_API int e_log_dom = -1;
-
-#ifdef HAVE_DLOG
-static Eina_Bool _dlog_enabled = EINA_FALSE;
-#endif
-
-static void
-_e_log_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc EINA_UNUSED, int line, const char *fmt, void *data EINA_UNUSED, va_list args)
-{
- const char *color;
-#ifdef HAVE_DLOG
- if (_dlog_enabled)
- {
- int log_level;
- const char buf[512];
-
- switch (level)
- {
- case EINA_LOG_LEVEL_CRITICAL:
- log_level = DLOG_ERROR;
- break;
- case EINA_LOG_LEVEL_ERR:
- log_level = DLOG_ERROR;
- break;
- case EINA_LOG_LEVEL_WARN:
- log_level = DLOG_WARN;
- break;
- case EINA_LOG_LEVEL_INFO:
- log_level = DLOG_INFO;
- break;
- case EINA_LOG_LEVEL_DBG:
- log_level = DLOG_DEBUG;
- break;
- default:
- log_level = DLOG_VERBOSE;
- break;
- }
-
- vsnprintf((char *)buf, sizeof(buf), fmt, args);
-
- if (e_config)
- {
- if (e_config->log_type == E_LOG_TYPE_SYSTEM)
- {
- print_system_log(log_level, LOG_TAG,
- "<%s> %18.18s:%04d %s",
- d->domain_str, ecore_file_file_get(file), line, buf);
- }
- else
- {
- dlog_print(log_level, LOG_TAG,
- "<%s> %18.18s:%04d %s",
- d->domain_str, ecore_file_file_get(file), line, buf);
- }
- }
- else
- {
- dlog_print(log_level, LOG_TAG,
- "<%s> %18.18s:%04d %s",
- d->domain_str, ecore_file_file_get(file), line, buf);
- }
- return;
- }
-#endif
- color = eina_log_level_color_get(level);
-
- fprintf(stdout,
- "%s<" EINA_COLOR_RESET "%s%s>" EINA_COLOR_RESET "%18.18s:%04d" EINA_COLOR_RESET " ",
- color, d->domain_str, color, ecore_file_file_get(file), line);
- vfprintf(stdout, fmt, args);
- putc('\n', stdout);
-}
-
-#ifdef HAVE_DLOG
-static void
-_e_log_wayland_dlog(const char *format, va_list args)
-{
- if (e_config)
- {
- if (e_config->log_type == E_LOG_TYPE_SYSTEM)
- vprint_system_log(DLOG_INFO, LOG_TAG, format, args);
- else
- dlog_vprint(DLOG_INFO, LOG_TAG, format, args);
- }
- else
- dlog_vprint(DLOG_INFO, LOG_TAG, format, args);
-}
-
-static void
-_e_log_wayland_stderr(const char *format, va_list args)
-{
- vfprintf(stderr, format, args);
-}
-
-EINTERN void
-e_log_dlog_enable(Eina_Bool enable)
-{
- if (_dlog_enabled == enable) return;
-
- _dlog_enabled = enable;
-
- if (_dlog_enabled)
- wl_log_set_handler_server(_e_log_wayland_dlog);
- else
- wl_log_set_handler_server(_e_log_wayland_stderr);
-}
-#endif
-
-EINTERN Eina_Bool
-e_log_path_set(const char *path)
-{
- int log_fd = -1;
- FILE *log_fl;
-
- if (!path)
- {
- ERR("no eina-log-path");
- return EINA_FALSE;
- }
-
- log_fl = fopen(path, "a");
- if (!log_fl)
- {
- ERR("failed: open file(%s)\n", path);
- return EINA_FALSE;
- }
-
- fflush(stdout);
- close(STDOUT_FILENO);
-
- fflush(stderr);
- close(STDERR_FILENO);
-
- setvbuf(log_fl, NULL, _IOLBF, 512);
- log_fd = fileno(log_fl);
-
- dup2(log_fd, STDOUT_FILENO);
- dup2(log_fd, STDERR_FILENO);
-
- fclose(log_fl);
-
- return EINA_TRUE;
-}
-
-EINTERN int
-e_log_init(void)
-{
- const char *s;
-
- eina_log_threads_enable();
-
- e_log_dom = eina_log_domain_register("e", EINA_COLOR_WHITE);
- if (e_log_dom < 0)
- {
- fprintf(stderr, "Could not create logging domain 'e'\n");
- return 0;
- }
-
- eina_log_print_cb_set(_e_log_cb, NULL);
- eina_log_domain_level_set("e", 3);
-
-#ifdef HAVE_DLOG
- if (getenv("E_LOG_DLOG_ENABLE"))
- e_log_dlog_enable(EINA_TRUE);
-#endif
-
- s = getenv("E_LOG_FILE_PATH");
- if (s)
- {
-#ifdef HAVE_DLOG
- e_log_dlog_enable(EINA_FALSE);
-#endif
- e_log_path_set(s);
- }
-
- return 1;
-}
-
-EINTERN int
-e_log_shutdown(void)
-{
- eina_log_domain_unregister(e_log_dom);
- e_log_dom = -1;
- return 0;
-}
-
+++ /dev/null
-#ifndef E_LOG_INTERN_H
-#define E_LOG_INTERN_H
-
-#include "e_intern.h"
-#include "e_log.h"
-
-EINTERN int e_log_init(void);
-EINTERN int e_log_shutdown(void);
-
-#ifdef HAVE_DLOG
-EINTERN void e_log_dlog_enable(Eina_Bool enable);
-#endif
-EINTERN Eina_Bool e_log_path_set(const char *path);
-
-#endif
+++ /dev/null
-#include "e_video_debug_intern.h"
-
-static Eina_Bool video_to_primary = EINA_FALSE;
-static Eina_Bool video_punch = EINA_FALSE;
-static Evas_Object *punch_obj = NULL;
-
-E_API Eina_Bool
-e_video_debug_display_primary_plane_value_get(void)
-{
- return video_to_primary;
-}
-
-E_API void
-e_video_debug_display_primary_plane_set(Eina_Bool set)
-{
- video_to_primary = set;
-}
-
-EINTERN Eina_Bool
-e_video_debug_punch_value_get(void)
-{
- return video_punch;
-}
-
-EINTERN void
-e_video_debug_punch_set(Eina_Bool set)
-{
- video_punch = set;
-}
-
-EINTERN void
-e_video_debug_screen_punch_set(int x, int y, int w, int h, int a, int r, int g, int b)
-{
- if (!punch_obj)
- {
- punch_obj = evas_object_rectangle_add(e_comp->evas);
- evas_object_layer_set(punch_obj, EVAS_LAYER_MAX);
- evas_object_render_op_set(punch_obj, EVAS_RENDER_COPY);
- }
-
- evas_object_color_set(punch_obj, r, g, b, a);
-
- if (w == 0 || h == 0)
- evas_output_size_get(e_comp->evas, &w, &h);
-
- evas_object_move(punch_obj, x, y);
- evas_object_resize(punch_obj, w, h);
- evas_object_show(punch_obj);
-}
-
-EINTERN void
-e_video_debug_screen_punch_unset(void)
-{
- if (!punch_obj)
- return;
-
- evas_object_del(punch_obj);
- punch_obj = NULL;
-}
+++ /dev/null
-#ifndef E_VIDEO_DEBUG_INTERN_H
-#define E_VIDEO_DEBUG_INTERN_H
-
-#include "e_intern.h"
-#include "e_video_debug.h"
-
-#ifdef VER
-#undef VER
-#endif
-
-#ifdef VWR
-#undef VWR
-#endif
-
-#ifdef VIN
-#undef VIN
-#endif
-
-#ifdef VDB
-#undef VDB
-#endif
-
-#define VER(fmt, ec, arg...) ELOGF("VIDEO <ERR>", fmt, ec, ##arg)
-#define VWR(fmt, ec, arg...) ELOGF("VIDEO <WRN>", fmt, ec, ##arg)
-#define VIN(fmt, ec, arg...) ELOGF("VIDEO <INF>", fmt, ec, ##arg)
-#define VDB(fmt, ec, arg...) DBG("window(0x%08"PRIxPTR") ec(%p): "fmt, \
- e_client_util_win_get(ec), ec, ##arg)
-
-#undef NEVER_GET_HERE
-#define NEVER_GET_HERE() CRI("** need to improve more **")
-
-EINTERN Eina_Bool e_video_debug_punch_value_get(void);
-EINTERN void e_video_debug_punch_set(Eina_Bool set);
-EINTERN void e_video_debug_screen_punch_set(int x, int y, int w, int h, int a, int r, int g, int b);
-EINTERN void e_video_debug_screen_punch_unset(void);
-
-#endif
--- /dev/null
+#include "e_error_intern.h"
+
+/* local subsystem functions */
+
+/* local subsystem globals */
+
+/* externally accessible functions */
+EINTERN void
+e_error_message_show_internal(char *txt)
+{
+ ELOGF("E ERROR", "%s", NULL, txt);
+}
+
+/* local subsystem functions */
--- /dev/null
+#ifndef E_ERROR_INTERN_H
+#define E_ERROR_INTERN_H
+
+#include "e_intern.h"
+
+#define e_error_message_show(args...) do \
+{ \
+ char __tmpbuf[4096]; \
+ \
+ snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
+ e_error_message_show_internal(__tmpbuf); \
+} while (0)
+
+EINTERN void e_error_message_show_internal(char *txt);
+
+#endif
--- /dev/null
+#ifndef E_INPUT_PRIVIATES_H
+#define E_INPUT_PRIVIATES_H
+
+#ifdef DBG
+# undef DBG
+#endif
+
+#ifdef INF
+# undef INF
+#endif
+
+#ifdef ERR
+# undef ERR
+#endif
+
+extern int _e_input_log_dom;
+#define DBG(...) EINA_LOG_DOM_DBG(_e_input_log_dom, __VA_ARGS__)
+#define INF(...) EINA_LOG_DOM_INFO(_e_input_log_dom, __VA_ARGS__)
+#define ERR(...) EINA_LOG_DOM_ERR(_e_input_log_dom, __VA_ARGS__)
+
+#define EIERR(msg, ARG...) ERR("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define EIINF(msg, ARG...) INF("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define EIDBG(msg, ARG...) DBG("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+
+#define DMERR(msg, ARG...) ERR("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define DMWRN(msg, ARG...) WRN("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define DMINF(msg, ARG...) INF("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+#define DMDBG(msg, ARG...) DBG("[%s:%d] "msg, __FUNCTION__, __LINE__, ##ARG)
+
+#endif
--- /dev/null
+#include "e_log_intern.h"
+#include <Ecore_File.h>
+
+E_API int e_log_dom = -1;
+
+#ifdef HAVE_DLOG
+static Eina_Bool _dlog_enabled = EINA_FALSE;
+#endif
+
+static void
+_e_log_cb(const Eina_Log_Domain *d, Eina_Log_Level level, const char *file, const char *fnc EINA_UNUSED, int line, const char *fmt, void *data EINA_UNUSED, va_list args)
+{
+ const char *color;
+#ifdef HAVE_DLOG
+ if (_dlog_enabled)
+ {
+ int log_level;
+ const char buf[512];
+
+ switch (level)
+ {
+ case EINA_LOG_LEVEL_CRITICAL:
+ log_level = DLOG_ERROR;
+ break;
+ case EINA_LOG_LEVEL_ERR:
+ log_level = DLOG_ERROR;
+ break;
+ case EINA_LOG_LEVEL_WARN:
+ log_level = DLOG_WARN;
+ break;
+ case EINA_LOG_LEVEL_INFO:
+ log_level = DLOG_INFO;
+ break;
+ case EINA_LOG_LEVEL_DBG:
+ log_level = DLOG_DEBUG;
+ break;
+ default:
+ log_level = DLOG_VERBOSE;
+ break;
+ }
+
+ vsnprintf((char *)buf, sizeof(buf), fmt, args);
+
+ if (e_config)
+ {
+ if (e_config->log_type == E_LOG_TYPE_SYSTEM)
+ {
+ print_system_log(log_level, LOG_TAG,
+ "<%s> %18.18s:%04d %s",
+ d->domain_str, ecore_file_file_get(file), line, buf);
+ }
+ else
+ {
+ dlog_print(log_level, LOG_TAG,
+ "<%s> %18.18s:%04d %s",
+ d->domain_str, ecore_file_file_get(file), line, buf);
+ }
+ }
+ else
+ {
+ dlog_print(log_level, LOG_TAG,
+ "<%s> %18.18s:%04d %s",
+ d->domain_str, ecore_file_file_get(file), line, buf);
+ }
+ return;
+ }
+#endif
+ color = eina_log_level_color_get(level);
+
+ fprintf(stdout,
+ "%s<" EINA_COLOR_RESET "%s%s>" EINA_COLOR_RESET "%18.18s:%04d" EINA_COLOR_RESET " ",
+ color, d->domain_str, color, ecore_file_file_get(file), line);
+ vfprintf(stdout, fmt, args);
+ putc('\n', stdout);
+}
+
+#ifdef HAVE_DLOG
+static void
+_e_log_wayland_dlog(const char *format, va_list args)
+{
+ if (e_config)
+ {
+ if (e_config->log_type == E_LOG_TYPE_SYSTEM)
+ vprint_system_log(DLOG_INFO, LOG_TAG, format, args);
+ else
+ dlog_vprint(DLOG_INFO, LOG_TAG, format, args);
+ }
+ else
+ dlog_vprint(DLOG_INFO, LOG_TAG, format, args);
+}
+
+static void
+_e_log_wayland_stderr(const char *format, va_list args)
+{
+ vfprintf(stderr, format, args);
+}
+
+EINTERN void
+e_log_dlog_enable(Eina_Bool enable)
+{
+ if (_dlog_enabled == enable) return;
+
+ _dlog_enabled = enable;
+
+ if (_dlog_enabled)
+ wl_log_set_handler_server(_e_log_wayland_dlog);
+ else
+ wl_log_set_handler_server(_e_log_wayland_stderr);
+}
+#endif
+
+EINTERN Eina_Bool
+e_log_path_set(const char *path)
+{
+ int log_fd = -1;
+ FILE *log_fl;
+
+ if (!path)
+ {
+ ERR("no eina-log-path");
+ return EINA_FALSE;
+ }
+
+ log_fl = fopen(path, "a");
+ if (!log_fl)
+ {
+ ERR("failed: open file(%s)\n", path);
+ return EINA_FALSE;
+ }
+
+ fflush(stdout);
+ close(STDOUT_FILENO);
+
+ fflush(stderr);
+ close(STDERR_FILENO);
+
+ setvbuf(log_fl, NULL, _IOLBF, 512);
+ log_fd = fileno(log_fl);
+
+ dup2(log_fd, STDOUT_FILENO);
+ dup2(log_fd, STDERR_FILENO);
+
+ fclose(log_fl);
+
+ return EINA_TRUE;
+}
+
+EINTERN int
+e_log_init(void)
+{
+ const char *s;
+
+ eina_log_threads_enable();
+
+ e_log_dom = eina_log_domain_register("e", EINA_COLOR_WHITE);
+ if (e_log_dom < 0)
+ {
+ fprintf(stderr, "Could not create logging domain 'e'\n");
+ return 0;
+ }
+
+ eina_log_print_cb_set(_e_log_cb, NULL);
+ eina_log_domain_level_set("e", 3);
+
+#ifdef HAVE_DLOG
+ if (getenv("E_LOG_DLOG_ENABLE"))
+ e_log_dlog_enable(EINA_TRUE);
+#endif
+
+ s = getenv("E_LOG_FILE_PATH");
+ if (s)
+ {
+#ifdef HAVE_DLOG
+ e_log_dlog_enable(EINA_FALSE);
+#endif
+ e_log_path_set(s);
+ }
+
+ return 1;
+}
+
+EINTERN int
+e_log_shutdown(void)
+{
+ eina_log_domain_unregister(e_log_dom);
+ e_log_dom = -1;
+ return 0;
+}
+
--- /dev/null
+#ifndef E_LOG_INTERN_H
+#define E_LOG_INTERN_H
+
+#include "e_intern.h"
+#include "e_log.h"
+
+EINTERN int e_log_init(void);
+EINTERN int e_log_shutdown(void);
+
+#ifdef HAVE_DLOG
+EINTERN void e_log_dlog_enable(Eina_Bool enable);
+#endif
+EINTERN Eina_Bool e_log_path_set(const char *path);
+
+#endif
--- /dev/null
+#include "e_video_debug_intern.h"
+
+static Eina_Bool video_to_primary = EINA_FALSE;
+static Eina_Bool video_punch = EINA_FALSE;
+static Evas_Object *punch_obj = NULL;
+
+E_API Eina_Bool
+e_video_debug_display_primary_plane_value_get(void)
+{
+ return video_to_primary;
+}
+
+E_API void
+e_video_debug_display_primary_plane_set(Eina_Bool set)
+{
+ video_to_primary = set;
+}
+
+EINTERN Eina_Bool
+e_video_debug_punch_value_get(void)
+{
+ return video_punch;
+}
+
+EINTERN void
+e_video_debug_punch_set(Eina_Bool set)
+{
+ video_punch = set;
+}
+
+EINTERN void
+e_video_debug_screen_punch_set(int x, int y, int w, int h, int a, int r, int g, int b)
+{
+ if (!punch_obj)
+ {
+ punch_obj = evas_object_rectangle_add(e_comp->evas);
+ evas_object_layer_set(punch_obj, EVAS_LAYER_MAX);
+ evas_object_render_op_set(punch_obj, EVAS_RENDER_COPY);
+ }
+
+ evas_object_color_set(punch_obj, r, g, b, a);
+
+ if (w == 0 || h == 0)
+ evas_output_size_get(e_comp->evas, &w, &h);
+
+ evas_object_move(punch_obj, x, y);
+ evas_object_resize(punch_obj, w, h);
+ evas_object_show(punch_obj);
+}
+
+EINTERN void
+e_video_debug_screen_punch_unset(void)
+{
+ if (!punch_obj)
+ return;
+
+ evas_object_del(punch_obj);
+ punch_obj = NULL;
+}
--- /dev/null
+#ifndef E_VIDEO_DEBUG_INTERN_H
+#define E_VIDEO_DEBUG_INTERN_H
+
+#include "e_intern.h"
+#include "e_video_debug.h"
+
+#ifdef VER
+#undef VER
+#endif
+
+#ifdef VWR
+#undef VWR
+#endif
+
+#ifdef VIN
+#undef VIN
+#endif
+
+#ifdef VDB
+#undef VDB
+#endif
+
+#define VER(fmt, ec, arg...) ELOGF("VIDEO <ERR>", fmt, ec, ##arg)
+#define VWR(fmt, ec, arg...) ELOGF("VIDEO <WRN>", fmt, ec, ##arg)
+#define VIN(fmt, ec, arg...) ELOGF("VIDEO <INF>", fmt, ec, ##arg)
+#define VDB(fmt, ec, arg...) DBG("window(0x%08"PRIxPTR") ec(%p): "fmt, \
+ e_client_util_win_get(ec), ec, ##arg)
+
+#undef NEVER_GET_HERE
+#define NEVER_GET_HERE() CRI("** need to improve more **")
+
+EINTERN Eina_Bool e_video_debug_punch_value_get(void);
+EINTERN void e_video_debug_punch_set(Eina_Bool set);
+EINTERN void e_video_debug_screen_punch_set(int x, int y, int w, int h, int a, int r, int g, int b);
+EINTERN void e_video_debug_screen_punch_unset(void);
+
+#endif
-I$(top_srcdir) \
-I$(top_srcdir)/src/bin \
-I$(top_srcdir)/src/bin/debug \
+-I$(top_srcdir)/src/bin/log \
-I$(top_srcdir)/src/bin/compmgr \
-I$(top_srcdir)/src/bin/core \
-I$(top_srcdir)/src/include \
-I$(top_builddir)/src/bin \
-I$(top_builddir)/src/bin/debug \
+-I$(top_builddir)/src/bin/log \
-I$(top_builddir)/src/bin/compmgr \
-I$(top_builddir)/src/bin/core \
-I$(top_builddir)/src/include \