summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2009-12-21 17:32:19 +0000
committerCedric BAIL <cedric.bail@free.fr>2009-12-21 17:32:19 +0000
commitd8e18953501c8bed701d66d0acdd4153b1122206 (patch)
treec75a2f4ce26f4861de6ce956866f8973f2d3a1f0 /legacy
parent2410d1f00a95ee235dc7dbf185e89dcd11c9060c (diff)
* ecore: Use eina_log.
Patch from Mathieu Taillefumier. SVN revision: 44637
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ecore/src/bin/ecore_config.c12
-rw-r--r--legacy/ecore/src/lib/ecore/ecore.c42
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_exe.c63
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_glib.c5
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_hash.c6
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_main.c25
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_pipe.c32
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_private.h35
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_signal.c36
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_timer.c2
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_value.c13
-rw-r--r--legacy/ecore/src/lib/ecore_con/ecore_con.c34
-rw-r--r--legacy/ecore/src/lib/ecore_con/ecore_con_private.h26
-rw-r--r--legacy/ecore/src/lib/ecore_con/ecore_con_url.c2
-rw-r--r--legacy/ecore/src/lib/ecore_config/ecore_config.c48
-rw-r--r--legacy/ecore/src/lib/ecore_config/ecore_config_db.c6
-rw-r--r--legacy/ecore/src/lib/ecore_config/ecore_config_extra.c31
-rw-r--r--legacy/ecore/src/lib/ecore_config/ecore_config_ipc_ecore.c14
-rw-r--r--legacy/ecore/src/lib/ecore_config/ecore_config_ipc_main.c8
-rw-r--r--legacy/ecore/src/lib/ecore_config/ecore_config_private.h36
-rw-r--r--legacy/ecore/src/lib/ecore_config/ecore_config_storage.c4
-rw-r--r--legacy/ecore/src/lib/ecore_directfb/ecore_directfb.c28
-rw-r--r--legacy/ecore/src/lib/ecore_directfb/ecore_directfb_private.h31
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas.c5
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_private.h4
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file.c12
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c18
-rw-r--r--legacy/ecore/src/lib/ecore_file/ecore_file_private.h26
-rw-r--r--legacy/ecore/src/lib/ecore_imf/ecore_imf.c12
-rw-r--r--legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c22
-rw-r--r--legacy/ecore/src/lib/ecore_imf/ecore_imf_private.h26
-rw-r--r--legacy/ecore/src/lib/ecore_input/ecore_input.c37
-rw-r--r--legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c12
-rw-r--r--legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h25
-rw-r--r--legacy/ecore/src/lib/ecore_job/ecore_job.c12
-rw-r--r--legacy/ecore/src/lib/ecore_job/ecore_job_private.h26
-rw-r--r--legacy/ecore/src/lib/ecore_sdl/ecore_sdl.c37
-rw-r--r--legacy/ecore/src/lib/ecore_txt/ecore_txt_private.h26
-rw-r--r--legacy/ecore/src/lib/ecore_win32/ecore_win32.c1
-rw-r--r--legacy/ecore/src/lib/ecore_wince/ecore_wince.c1
-rw-r--r--legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb.c16
-rw-r--r--legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_events.c10
-rw-r--r--legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c2
-rw-r--r--legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c4
-rw-r--r--legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_private.h27
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c18
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c14
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c4
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x_private.h27
-rw-r--r--legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr.c10
50 files changed, 698 insertions, 275 deletions
diff --git a/legacy/ecore/src/bin/ecore_config.c b/legacy/ecore/src/bin/ecore_config.c
index e3ef78c514..243f31f09f 100644
--- a/legacy/ecore/src/bin/ecore_config.c
+++ b/legacy/ecore/src/bin/ecore_config.c
@@ -62,7 +62,7 @@ get(const char *key)
62 62
63 if (!(e = ecore_config_get(key))) 63 if (!(e = ecore_config_get(key)))
64 { 64 {
65 fprintf(stderr, "No such property\n"); 65 EINA_LOG_ERR("No such property");
66 return -1; 66 return -1;
67 } 67 }
68 68
@@ -92,7 +92,7 @@ get(const char *key)
92 temp = ecore_config_theme_get(key); 92 temp = ecore_config_theme_get(key);
93 break; 93 break;
94 default: 94 default:
95 fprintf(stderr, "Property has unrecognized type"); 95 EINA_LOG_ERR("Property has unrecognized type");
96 return -1; 96 return -1;
97 } 97 }
98 if(temp) 98 if(temp)
@@ -175,7 +175,7 @@ main(int argc, char * const argv[])
175 float f; 175 float f;
176 176
177 file = key = prog = NULL; 177 file = key = prog = NULL;
178 178 eina_init();
179 prog = strdup(argv[0]); 179 prog = strdup(argv[0]);
180 180
181 if(argc < 4) 181 if(argc < 4)
@@ -275,7 +275,7 @@ main(int argc, char * const argv[])
275 275
276 if(ecore_config_init("econfig") != ECORE_CONFIG_ERR_SUCC) 276 if(ecore_config_init("econfig") != ECORE_CONFIG_ERR_SUCC)
277 { 277 {
278 fprintf(stderr, "Couldn't init ecore_config!"); 278 EINA_LOG_ERR("Couldn't init ecore_config!");
279 return 1; 279 return 1;
280 } 280 }
281 281
@@ -313,7 +313,7 @@ main(int argc, char * const argv[])
313 if (list(file)) ret = 1; 313 if (list(file)) ret = 1;
314 break; 314 break;
315 default: 315 default:
316 printf("Unhandled command '%c'\n", cmd); 316 EINA_LOG_ERR("Unhandled command '%c'", cmd);
317 } 317 }
318 318
319 ecore_config_shutdown(); 319 ecore_config_shutdown();
@@ -323,7 +323,7 @@ main(int argc, char * const argv[])
323 323
324 if(file) 324 if(file)
325 free(file); 325 free(file);
326 326 eina_shutdown();
327 return ret; 327 return ret;
328} 328}
329#else 329#else
diff --git a/legacy/ecore/src/lib/ecore/ecore.c b/legacy/ecore/src/lib/ecore/ecore.c
index cd648e650e..ff00ff4a56 100644
--- a/legacy/ecore/src/lib/ecore/ecore.c
+++ b/legacy/ecore/src/lib/ecore/ecore.c
@@ -34,7 +34,7 @@
34 34
35static const char *_ecore_magic_string_get(Ecore_Magic m); 35static const char *_ecore_magic_string_get(Ecore_Magic m);
36static int _ecore_init_count = 0; 36static int _ecore_init_count = 0;
37 37EAPI int _ecore_log_dom = -1;
38int _ecore_fps_debug = 0; 38int _ecore_fps_debug = 0;
39 39
40/** OpenBSD does not define CODESET 40/** OpenBSD does not define CODESET
@@ -79,7 +79,7 @@ ecore_init(void)
79 /* 79 /*
80 if (strcmp(nl_langinfo(CODESET), "UTF-8")) 80 if (strcmp(nl_langinfo(CODESET), "UTF-8"))
81 { 81 {
82 printf("WARNING: not a utf8 locale!\n"); 82 WRN("Not a utf8 locale!");
83 } 83 }
84 */ 84 */
85#ifdef HAVE_EVIL 85#ifdef HAVE_EVIL
@@ -88,6 +88,11 @@ ecore_init(void)
88#endif 88#endif
89 if (!eina_init()) 89 if (!eina_init())
90 goto shutdown_evil; 90 goto shutdown_evil;
91 _ecore_log_dom = eina_log_domain_register("Ecore",ECORE_DEFAULT_LOG_COLOR);
92 if (_ecore_log_dom < 0) {
93 EINA_LOG_ERR("Ecore was unable to create a log domain.");
94 goto shutdown_log_dom;
95 }
91 if (getenv("ECORE_FPS_DEBUG")) _ecore_fps_debug = 1; 96 if (getenv("ECORE_FPS_DEBUG")) _ecore_fps_debug = 1;
92 if (_ecore_fps_debug) _ecore_fps_debug_init(); 97 if (_ecore_fps_debug) _ecore_fps_debug_init();
93 _ecore_signal_init(); 98 _ecore_signal_init();
@@ -98,6 +103,8 @@ ecore_init(void)
98 103
99 return _ecore_init_count; 104 return _ecore_init_count;
100 105
106 shutdown_log_dom:
107 eina_shutdown();
101 shutdown_evil: 108 shutdown_evil:
102#ifdef HAVE_EVIL 109#ifdef HAVE_EVIL
103 evil_shutdown(); 110 evil_shutdown();
@@ -134,6 +141,8 @@ ecore_shutdown(void)
134 _ecore_event_shutdown(); 141 _ecore_event_shutdown();
135 _ecore_main_shutdown(); 142 _ecore_main_shutdown();
136 _ecore_signal_shutdown(); 143 _ecore_signal_shutdown();
144 eina_log_domain_unregister(_ecore_log_dom);
145 _ecore_log_dom = -1;
137 eina_shutdown(); 146 eina_shutdown();
138#ifdef HAVE_EVIL 147#ifdef HAVE_EVIL
139 evil_shutdown(); 148 evil_shutdown();
@@ -145,25 +154,22 @@ ecore_shutdown(void)
145EAPI void 154EAPI void
146_ecore_magic_fail(const void *d, Ecore_Magic m, Ecore_Magic req_m, const char *fname) 155_ecore_magic_fail(const void *d, Ecore_Magic m, Ecore_Magic req_m, const char *fname)
147{ 156{
148 fprintf(stderr, 157 ERR("\n"
149 "\n" 158 "*** ECORE ERROR: Ecore Magic Check Failed!!!\n"
150 "*** ECORE ERROR: Ecore Magic Check Failed!!!\n" 159 "*** IN FUNCTION: %s()", fname);
151 "*** IN FUNCTION: %s()\n", fname);
152 if (!d) 160 if (!d)
153 fprintf(stderr, " Input handle pointer is NULL!\n"); 161 ERR(" Input handle pointer is NULL!");
154 else if (m == ECORE_MAGIC_NONE) 162 else if (m == ECORE_MAGIC_NONE)
155 fprintf(stderr, " Input handle has already been freed!\n"); 163 ERR(" Input handle has already been freed!");
156 else if (m != req_m) 164 else if (m != req_m)
157 fprintf(stderr, " Input handle is wrong type\n" 165 ERR(" Input handle is wrong type\n"
158 " Expected: %08x - %s\n" 166 " Expected: %08x - %s\n"
159 " Supplied: %08x - %s\n", 167 " Supplied: %08x - %s",
160 (unsigned int)req_m, _ecore_magic_string_get(req_m), 168 (unsigned int)req_m, _ecore_magic_string_get(req_m),
161 (unsigned int)m, _ecore_magic_string_get(m)); 169 (unsigned int)m, _ecore_magic_string_get(m));
162 fprintf(stderr, 170 ERR("*** NAUGHTY PROGRAMMER!!!\n"
163 "*** NAUGHTY PROGRAMMER!!!\n" 171 "*** SPANK SPANK SPANK!!!\n"
164 "*** SPANK SPANK SPANK!!!\n" 172 "*** Now go fix your code. Tut tut tut!");
165 "*** Now go fix your code. Tut tut tut!\n"
166 "\n");
167 if (getenv("ECORE_ERROR_ABORT")) abort(); 173 if (getenv("ECORE_ERROR_ABORT")) abort();
168} 174}
169 175
diff --git a/legacy/ecore/src/lib/ecore/ecore_exe.c b/legacy/ecore/src/lib/ecore/ecore_exe.c
index cc29e4c2fe..8c0f07ddeb 100644
--- a/legacy/ecore/src/lib/ecore/ecore_exe.c
+++ b/legacy/ecore/src/lib/ecore/ecore_exe.c
@@ -160,7 +160,7 @@ _ecore_exe_check_errno(int result, const char *file, int line)
160 case EAGAIN: 160 case EAGAIN:
161 case EINTR: 161 case EINTR:
162 { /* Not now, try later. */ 162 { /* Not now, try later. */
163 fprintf(stderr, "*** Must try again in %s @%u.\n", file, line); 163 ERR("*** Must try again in %s @%u.", file, line);
164 result = -1; 164 result = -1;
165 break; 165 break;
166 } 166 }
@@ -169,15 +169,15 @@ _ecore_exe_check_errno(int result, const char *file, int line)
169 case ENFILE: 169 case ENFILE:
170 case ENOLCK: 170 case ENOLCK:
171 { /* Low on resources. */ 171 { /* Low on resources. */
172 fprintf(stderr, "*** Low on resources in %s @%u.\n", file, 172 ERR("*** Low on resources in %s @%u.", file,
173 line); 173 line);
174 result = 0; 174 result = 0;
175 break; 175 break;
176 } 176 }
177 177
178 case EIO: 178 case EIO:
179 { /* I/O error. */ 179 { /* I/O error. */
180 fprintf(stderr, "*** I/O error in %s @%u.\n", file, line); 180 ERR("*** I/O error in %s @%u.", file, line);
181 result = 0; 181 result = 0;
182 break; 182 break;
183 } 183 }
@@ -191,24 +191,22 @@ _ecore_exe_check_errno(int result, const char *file, int line)
191 case EPERM: 191 case EPERM:
192 case EBUSY: 192 case EBUSY:
193 { /* Programmer fucked up. */ 193 { /* Programmer fucked up. */
194 fprintf(stderr, 194 ERR("*** NAUGHTY PROGRAMMER!!!\n"
195 "*** NAUGHTY PROGRAMMER!!!\n" 195 "*** SPANK SPANK SPANK!!!\n"
196 "*** SPANK SPANK SPANK!!!\n" 196 "*** Now go fix your code in %s @%u. Tut tut tut!",
197 "*** Now go fix your code in %s @%u. Tut tut tut!\n" 197 file, line);
198 "\n", file, line);
199 result = 0; 198 result = 0;
200 break; 199 break;
201 } 200 }
202 201
203 default: 202 default:
204 { /* Unsupported errno code, please add this one. */ 203 { /* Unsupported errno code, please add this one. */
205 fprintf(stderr, 204 ERR("*** NAUGHTY PROGRAMMER!!!\n"
206 "*** NAUGHTY PROGRAMMER!!!\n" 205 "*** SPANK SPANK SPANK!!!\n"
207 "*** SPANK SPANK SPANK!!!\n" 206 "*** Unsupported errno code %d, please add this one.\n"
208 "*** Unsupported errno code %d, please add this one.\n" 207 "*** Now go fix your code in %s @%u, from %s @%u. Tut tut tut!",
209 "*** Now go fix your code in %s @%u, from %s @%u. Tut tut tut!\n" 208 saved_errno, __FILE__, __LINE__, file, line);
210 "\n", saved_errno, __FILE__, __LINE__, file, line); 209 result = 0;
211 result = 0;
212 break; 210 break;
213 } 211 }
214 } 212 }
@@ -400,7 +398,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
400 398
401 if (pid == -1) 399 if (pid == -1)
402 { 400 {
403 fprintf(stderr, "Failed to fork process\n"); 401 ERR("Failed to fork process");
404 pid = 0; 402 pid = 0;
405 } 403 }
406 else if (pid == 0) /* child */ 404 else if (pid == 0) /* child */
@@ -489,8 +487,8 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
489 if (vfork_exec_errno != 0) 487 if (vfork_exec_errno != 0)
490 { 488 {
491 n = vfork_exec_errno; 489 n = vfork_exec_errno;
492 fprintf(stderr, "Could not start \"%s\"\n", 490 ERR("Could not start \"%s\"",
493 exe_cmd); 491 exe_cmd);
494 pid = 0; 492 pid = 0;
495 } 493 }
496 break; 494 break;
@@ -604,7 +602,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
604 if (e) /* Send the event. */ 602 if (e) /* Send the event. */
605 ecore_event_add(ECORE_EXE_EVENT_ADD, e, 603 ecore_event_add(ECORE_EXE_EVENT_ADD, e,
606 _ecore_exe_event_add_free, NULL); 604 _ecore_exe_event_add_free, NULL);
607 /* printf("Running as %d for %s.\n", exe->pid, exe->cmd); */ 605 /* INF("Running as %d for %s.\n", exe->pid, exe->cmd); */
608 } 606 }
609 607
610 errno = n; 608 errno = n;
@@ -1115,7 +1113,7 @@ ecore_exe_terminate(Ecore_Exe *exe)
1115 return; 1113 return;
1116 } 1114 }
1117 _ecore_exe_dead_attach(exe); 1115 _ecore_exe_dead_attach(exe);
1118 printf("Sending TERM signal to %s (%d).\n", exe->cmd, exe->pid); 1116 INF("Sending TERM signal to %s (%d).", exe->cmd, exe->pid);
1119 kill(exe->pid, SIGTERM); 1117 kill(exe->pid, SIGTERM);
1120} 1118}
1121 1119
@@ -1145,7 +1143,7 @@ ecore_exe_kill(Ecore_Exe *exe)
1145 ecore_timer_add(10.0, _ecore_exe_make_sure_its_really_dead, dead); 1143 ecore_timer_add(10.0, _ecore_exe_make_sure_its_really_dead, dead);
1146 } 1144 }
1147 1145
1148 printf("Sending KILL signal to %s (%d).\n", exe->cmd, exe->pid); 1146 INF("Sending KILL signal to %s (%d).", exe->cmd, exe->pid);
1149 kill(exe->pid, SIGKILL); 1147 kill(exe->pid, SIGKILL);
1150} 1148}
1151 1149
@@ -1236,11 +1234,11 @@ _ecore_exe_make_sure_its_dead(void *data)
1236 if ((exe = _ecore_exe_is_it_alive(dead->pid)) != NULL) 1234 if ((exe = _ecore_exe_is_it_alive(dead->pid)) != NULL)
1237 { 1235 {
1238 if (dead->cmd) 1236 if (dead->cmd)
1239 printf("Sending KILL signal to alledgedly dead %s (%d).\n", 1237 INF("Sending KILL signal to alledgedly dead %s (%d).",
1240 dead->cmd, dead->pid); 1238 dead->cmd, dead->pid);
1241 else 1239 else
1242 printf("Sending KILL signal to alledgedly dead PID %d.\n", 1240 INF("Sending KILL signal to alledgedly dead PID %d.",
1243 dead->pid); 1241 dead->pid);
1244 exe->doomsday_clock = 1242 exe->doomsday_clock =
1245 ecore_timer_add(10.0, _ecore_exe_make_sure_its_really_dead, 1243 ecore_timer_add(10.0, _ecore_exe_make_sure_its_really_dead,
1246 dead); 1244 dead);
@@ -1267,12 +1265,11 @@ _ecore_exe_make_sure_its_really_dead(void *data)
1267 1265
1268 if ((exe = _ecore_exe_is_it_alive(dead->pid)) != NULL) 1266 if ((exe = _ecore_exe_is_it_alive(dead->pid)) != NULL)
1269 { 1267 {
1270 printf 1268 ERR("RUN! The zombie wants to eat your brains! And your CPU!");
1271 ("RUN! The zombie wants to eat your brains! And your CPU!\n");
1272 if (dead->cmd) 1269 if (dead->cmd)
1273 printf("%s (%d) is not really dead.\n", dead->cmd, dead->pid); 1270 INF("%s (%d) is not really dead.", dead->cmd, dead->pid);
1274 else 1271 else
1275 printf("PID %d is not really dead.\n", dead->pid); 1272 INF("PID %d is not really dead.", dead->pid);
1276 exe->doomsday_clock = NULL; 1273 exe->doomsday_clock = NULL;
1277 } 1274 }
1278 IF_FREE(dead->cmd); 1275 IF_FREE(dead->cmd);
@@ -1508,15 +1505,13 @@ _ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler,
1508 if (flags & ECORE_EXE_PIPE_READ) 1505 if (flags & ECORE_EXE_PIPE_READ)
1509 { 1506 {
1510 if (exe->read_data_size) 1507 if (exe->read_data_size)
1511 printf 1508 INF("There are %d bytes left unsent from the dead exe %s.",
1512 ("There are %d bytes left unsent from the dead exe %s.\n",
1513 exe->read_data_size, exe->cmd); 1509 exe->read_data_size, exe->cmd);
1514 } 1510 }
1515 else 1511 else
1516 { 1512 {
1517 if (exe->error_data_size) 1513 if (exe->error_data_size)
1518 printf 1514 INF("There are %d bytes left unsent from the dead exe %s.",
1519 ("There are %d bytes left unsent from the dead exe %s.\n",
1520 exe->error_data_size, exe->cmd); 1515 exe->error_data_size, exe->cmd);
1521 } 1516 }
1522 /* Thought about this a bit. If the exe has actually 1517 /* Thought about this a bit. If the exe has actually
@@ -1569,7 +1564,7 @@ _ecore_exe_data_write_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED_
1569 int ok = 0; 1564 int ok = 0;
1570 int result; 1565 int result;
1571 1566
1572 printf("Closing stdin for %s\n", exe->cmd); 1567 INF("Closing stdin for %s", exe->cmd);
1573 /* if (exe->child_fd_write != -1) E_NO_ERRNO(result, fsync(exe->child_fd_write), ok); This a) doesn't work, and b) isn't needed. */ 1568 /* if (exe->child_fd_write != -1) E_NO_ERRNO(result, fsync(exe->child_fd_write), ok); This a) doesn't work, and b) isn't needed. */
1574 IF_FN_DEL(ecore_main_fd_handler_del, exe->write_fd_handler); 1569 IF_FN_DEL(ecore_main_fd_handler_del, exe->write_fd_handler);
1575 if (exe->child_fd_write != -1) 1570 if (exe->child_fd_write != -1)
diff --git a/legacy/ecore/src/lib/ecore/ecore_glib.c b/legacy/ecore/src/lib/ecore/ecore_glib.c
index f2794213d4..c635a82c32 100644
--- a/legacy/ecore/src/lib/ecore/ecore_glib.c
+++ b/legacy/ecore/src/lib/ecore/ecore_glib.c
@@ -12,6 +12,7 @@
12 12
13#ifdef HAVE_GLIB 13#ifdef HAVE_GLIB
14#include <glib.h> 14#include <glib.h>
15#include "ecore_private.h"
15 16
16static Eina_Bool _ecore_glib_active = EINA_FALSE; 17static Eina_Bool _ecore_glib_active = EINA_FALSE;
17static int (*_ecore_glib_select_original)(int, fd_set*, fd_set*, fd_set*, struct timeval *); 18static int (*_ecore_glib_select_original)(int, fd_set*, fd_set*, fd_set*, struct timeval *);
@@ -28,8 +29,8 @@ _ecore_glib_fds_resize(size_t size)
28 void *tmp = realloc(_ecore_glib_fds, sizeof(GPollFD) * size); 29 void *tmp = realloc(_ecore_glib_fds, sizeof(GPollFD) * size);
29 if (!tmp) 30 if (!tmp)
30 { 31 {
31 fprintf(stderr, "ERROR: Could not realloc from %zu to %zu buckets.\n", 32 ERR("Could not realloc from %zu to %zu buckets.",
32 _ecore_glib_fds_size, size); 33 _ecore_glib_fds_size, size);
33 return EINA_FALSE; 34 return EINA_FALSE;
34 } 35 }
35 36
diff --git a/legacy/ecore/src/lib/ecore/ecore_hash.c b/legacy/ecore/src/lib/ecore/ecore_hash.c
index 90e0cbace7..4f1050f7d8 100644
--- a/legacy/ecore/src/lib/ecore/ecore_hash.c
+++ b/legacy/ecore/src/lib/ecore/ecore_hash.c
@@ -366,10 +366,10 @@ ecore_hash_dump_graph(Ecore_Hash *hash)
366 Ecore_Hash_Node *node; 366 Ecore_Hash_Node *node;
367 for (node = hash->buckets[i]; node; node = node->next) 367 for (node = hash->buckets[i]; node; node = node->next)
368 n++; 368 n++;
369 printf("%d\t%u\n", i, n); 369 INF("%d\t%u", i, n);
370 } 370 }
371 else 371 else
372 printf("%d\t0\n", i); 372 INF("%d\t0", i);
373} 373}
374 374
375/** 375/**
@@ -395,7 +395,7 @@ ecore_hash_dump_stats(Ecore_Hash *hash)
395 } 395 }
396 } 396 }
397 variance = (sum_n_2 - ((sum_n * sum_n) / (double)i)) / (double)i; 397 variance = (sum_n_2 - ((sum_n * sum_n) / (double)i)) / (double)i;
398 printf("Average length: %f\n\tvariance^2: %f\n", (sum_n / (double)i), 398 INF("Average length: %f\n\tvariance^2: %f", (sum_n / (double)i),
399 variance); 399 variance);
400} 400}
401 401
diff --git a/legacy/ecore/src/lib/ecore/ecore_main.c b/legacy/ecore/src/lib/ecore/ecore_main.c
index 502b9f07de..0a3205a4af 100644
--- a/legacy/ecore/src/lib/ecore/ecore_main.c
+++ b/legacy/ecore/src/lib/ecore/ecore_main.c
@@ -379,10 +379,9 @@ _ecore_main_shutdown(void)
379{ 379{
380 if (in_main_loop) 380 if (in_main_loop)
381 { 381 {
382 fprintf(stderr, 382 ERR("\n"
383 "\n" 383 "*** ECORE WARINING: Calling ecore_shutdown() while still in the main loop.\n"
384 "*** ECORE WARINING: Calling ecore_shutdown() while still in the main loop.\n" 384 "*** Program may crash or behave strangely now.");
385 "*** Program may crash or behave strangely now.\n");
386 return; 385 return;
387 } 386 }
388 while (fd_handlers) 387 while (fd_handlers)
@@ -510,7 +509,7 @@ _ecore_main_select(double timeout)
510static void 509static void
511_ecore_main_fd_handlers_bads_rem(void) 510_ecore_main_fd_handlers_bads_rem(void)
512{ 511{
513 fprintf(stderr, "Removing bad fds\n"); 512 ERR("Removing bad fds");
514 Ecore_Fd_Handler *fdh; 513 Ecore_Fd_Handler *fdh;
515 Eina_Inlist *l; 514 Eina_Inlist *l;
516 515
@@ -522,20 +521,20 @@ _ecore_main_fd_handlers_bads_rem(void)
522 521
523 if ((fcntl(fdh->fd, F_GETFD) < 0) && (errno == EBADF)) 522 if ((fcntl(fdh->fd, F_GETFD) < 0) && (errno == EBADF))
524 { 523 {
525 fprintf(stderr, "Found bad fd at index %d\n", fdh->fd); 524 ERR("Found bad fd at index %d", fdh->fd);
526 if (fdh->flags & ECORE_FD_ERROR) 525 if (fdh->flags & ECORE_FD_ERROR)
527 { 526 {
528 fprintf(stderr, "Fd set for error! calling user\n"); 527 ERR("Fd set for error! calling user");
529 if (!fdh->func(fdh->data, fdh)) 528 if (!fdh->func(fdh->data, fdh))
530 { 529 {
531 fprintf(stderr, "Fd function err returned 0, remove it\n"); 530 ERR("Fd function err returned 0, remove it");
532 fdh->delete_me = 1; 531 fdh->delete_me = 1;
533 fd_handlers_delete_me = 1; 532 fd_handlers_delete_me = 1;
534 } 533 }
535 } 534 }
536 else 535 else
537 { 536 {
538 fprintf(stderr, "Problematic fd found at %d! setting it for delete\n", fdh->fd); 537 ERR("Problematic fd found at %d! setting it for delete", fdh->fd);
539 fdh->delete_me = 1; 538 fdh->delete_me = 1;
540 fd_handlers_delete_me = 1; 539 fd_handlers_delete_me = 1;
541 } 540 }
@@ -560,7 +559,7 @@ _ecore_main_fd_handlers_cleanup(void)
560 l = l->next; 559 l = l->next;
561 if (fdh->delete_me) 560 if (fdh->delete_me)
562 { 561 {
563// fprintf(stderr, "Removing fd %d\n", fdh->fd); 562// ERR("Removing fd %d", fdh->fd);
564 fd_handlers = (Ecore_Fd_Handler *) eina_inlist_remove(EINA_INLIST_GET(fd_handlers), 563 fd_handlers = (Ecore_Fd_Handler *) eina_inlist_remove(EINA_INLIST_GET(fd_handlers),
565 EINA_INLIST_GET(fdh)); 564 EINA_INLIST_GET(fdh));
566 ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE); 565 ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE);
@@ -878,13 +877,13 @@ _ecore_main_win32_select(int nfds, fd_set *readfds, fd_set *writefds,
878 char *msg; 877 char *msg;
879 878
880 msg = evil_last_error_get(); 879 msg = evil_last_error_get();
881 printf (" * %s\n", msg); 880 ERR(" * %s\n", msg);
882 free(msg); 881 free(msg);
883 res = -1; 882 res = -1;
884 } 883 }
885 else if (result == WAIT_TIMEOUT) 884 else if (result == WAIT_TIMEOUT)
886 { 885 {
887 printf ("time out\n"); 886 ERR("time out\n");
888 res = 0; 887 res = 0;
889 } 888 }
890 else if (result == (WAIT_OBJECT_0 + objects_nbr)) 889 else if (result == (WAIT_OBJECT_0 + objects_nbr))
@@ -928,7 +927,7 @@ _ecore_main_win32_select(int nfds, fd_set *readfds, fd_set *writefds,
928 } 927 }
929 else 928 else
930 { 929 {
931 fprintf(stderr, "unknown result...\n"); 930 ERR(stderr, "unknown result...\n");
932 res = -1; 931 res = -1;
933 } 932 }
934 933
diff --git a/legacy/ecore/src/lib/ecore/ecore_pipe.c b/legacy/ecore/src/lib/ecore/ecore_pipe.c
index 149d6f8ce2..6c52731856 100644
--- a/legacy/ecore/src/lib/ecore/ecore_pipe.c
+++ b/legacy/ecore/src/lib/ecore/ecore_pipe.c
@@ -415,8 +415,8 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
415 else if (ret > 0) 415 else if (ret > 0)
416 { 416 {
417 /* XXX What should we do here? */ 417 /* XXX What should we do here? */
418 fprintf(stderr, "The length of the data was not written complete" 418 ERR("The length of the data was not written complete"
419 " to the pipe\n"); 419 " to the pipe");
420 return FALSE; 420 return FALSE;
421 } 421 }
422 else if (ret == PIPE_FD_ERROR && errno == EPIPE) 422 else if (ret == PIPE_FD_ERROR && errno == EPIPE)
@@ -430,9 +430,9 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
430 ; 430 ;
431 else 431 else
432 { 432 {
433 fprintf(stderr, "An unhandled error (ret: %d errno: %d)" 433 ERR("An unhandled error (ret: %d errno: %d)"
434 "occured while writing to the pipe the length\n", 434 "occured while writing to the pipe the length",
435 ret, errno); 435 ret, errno);
436 } 436 }
437 } 437 }
438 while (retry--); 438 while (retry--);
@@ -464,9 +464,9 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
464 ; 464 ;
465 else 465 else
466 { 466 {
467 fprintf(stderr, "An unhandled error (ret: %d errno: %d)" 467 ERR("An unhandled error (ret: %d errno: %d)"
468 "occured while writing to the pipe the length\n", 468 "occured while writing to the pipe the length",
469 ret, errno); 469 ret, errno);
470 } 470 }
471 } 471 }
472 while (retry--); 472 while (retry--);
@@ -503,8 +503,8 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
503 else if (ret > 0) 503 else if (ret > 0)
504 { 504 {
505 /* XXX What should we do here? */ 505 /* XXX What should we do here? */
506 fprintf(stderr, "Only read %d bytes from the pipe, although" 506 ERR("Only read %d bytes from the pipe, although"
507 " we need to read %d bytes.\n", ret, sizeof(p->len)); 507 " we need to read %d bytes.", ret, sizeof(p->len));
508 } 508 }
509 else if (ret == 0) 509 else if (ret == 0)
510 { 510 {
@@ -519,9 +519,9 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
519 return ECORE_CALLBACK_RENEW; 519 return ECORE_CALLBACK_RENEW;
520 else 520 else
521 { 521 {
522 fprintf(stderr, "An unhandled error (ret: %d errno: %d)" 522 ERR("An unhandled error (ret: %d errno: %d)"
523 "occured while reading from the pipe the length\n", 523 "occured while reading from the pipe the length",
524 ret, errno); 524 ret, errno);
525 return ECORE_CALLBACK_RENEW; 525 return ECORE_CALLBACK_RENEW;
526 } 526 }
527#else 527#else
@@ -575,9 +575,9 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
575 return ECORE_CALLBACK_RENEW; 575 return ECORE_CALLBACK_RENEW;
576 else 576 else
577 { 577 {
578 fprintf(stderr, "An unhandled error (ret: %d errno: %d)" 578 ERR("An unhandled error (ret: %d errno: %d)"
579 "occured while reading from the pipe the data\n", 579 "occured while reading from the pipe the data",
580 ret, errno); 580 ret, errno);
581 return ECORE_CALLBACK_RENEW; 581 return ECORE_CALLBACK_RENEW;
582 } 582 }
583#else 583#else
diff --git a/legacy/ecore/src/lib/ecore/ecore_private.h b/legacy/ecore/src/lib/ecore/ecore_private.h
index b1c7f1fbe1..ca9c5b36e0 100644
--- a/legacy/ecore/src/lib/ecore/ecore_private.h
+++ b/legacy/ecore/src/lib/ecore/ecore_private.h
@@ -23,6 +23,41 @@
23# undef EAPI 23# undef EAPI
24#endif 24#endif
25 25
26extern int _ecore_log_dom ;
27#ifdef _ECORE_DEFAULT_LOG_DOM
28# undef _ECORE_DEFAULT_LOG_DOM
29#endif
30#define _ECORE_DEFAULT_LOG_DOM _ecore_log_dom
31
32#ifdef ECORE_DEFAULT_LOG_COLOR
33# undef ECORE_DEFAULT_LOG_COLOR
34#endif
35#define ECORE_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
36
37#ifdef ERR
38# undef ERR
39#endif
40#define ERR(...) EINA_LOG_DOM_ERR(_ECORE_DEFAULT_LOG_DOM, __VA_ARGS__)
41
42#ifdef DBG
43# undef DBG
44#endif
45#define DBG(...) EINA_LOG_DOM_DBG(_ECORE_DEFAULT_LOG_DOM, __VA_ARGS__)
46
47#ifdef INF
48# undef INF
49#endif
50#define INF(...) EINA_LOG_DOM_INFO(_ECORE_DEFAULT_LOG_DOM, __VA_ARGS__)
51
52#ifdef WRN
53# undef WRN
54#endif
55#define WRN(...) EINA_LOG_DOM_WARN(_ECORE_DEFAULT_LOG_DOM, __VA_ARGS__)
56
57#ifdef CRIT
58# undef CRIT
59#endif
60#define CRIT(...) EINA_LOG_DOM_CRIT(_ECORE_DEFAULT_LOG_DOM, __VA_ARGS__)
26#ifdef _WIN32 61#ifdef _WIN32
27# ifdef EFL_ECORE_BUILD 62# ifdef EFL_ECORE_BUILD
28# ifdef DLL_EXPORT 63# ifdef DLL_EXPORT
diff --git a/legacy/ecore/src/lib/ecore/ecore_signal.c b/legacy/ecore/src/lib/ecore/ecore_signal.c
index baa572c335..89a38ed299 100644
--- a/legacy/ecore/src/lib/ecore/ecore_signal.c
+++ b/legacy/ecore/src/lib/ecore/ecore_signal.c
@@ -199,8 +199,8 @@ _ecore_signal_call(void)
199#endif 199#endif
200 sigprocmask(SIG_BLOCK, &newset, &oldset); 200 sigprocmask(SIG_BLOCK, &newset, &oldset);
201 if (sigchld_count > MAXSIGQ) 201 if (sigchld_count > MAXSIGQ)
202 printf("ECORE WARNING. %i SIGCHLD in queue. max queue size %i. losing " 202 WRN("%i SIGCHLD in queue. max queue size %i. losing "
203 "siginfo for extra signals.\n", sigchld_count, MAXSIGQ); 203 "siginfo for extra signals.", sigchld_count, MAXSIGQ);
204 for (n = 0; n < sigchld_count; n++) 204 for (n = 0; n < sigchld_count; n++)
205 { 205 {
206 pid_t pid; 206 pid_t pid;
@@ -271,8 +271,8 @@ _ecore_signal_call(void)
271 sigchld_count = 0; 271 sigchld_count = 0;
272 272
273 if (sigusr1_count > MAXSIGQ) 273 if (sigusr1_count > MAXSIGQ)
274 printf("ECORE WARNING. %i SIGUSR1 in queue. max queue size %i. losing " 274 WRN("%i SIGUSR1 in queue. max queue size %i. losing "
275 "siginfo for extra signals.\n", sigusr1_count, MAXSIGQ); 275 "siginfo for extra signals.", sigusr1_count, MAXSIGQ);
276 for (n = 0; n < sigusr1_count; n++) 276 for (n = 0; n < sigusr1_count; n++)
277 { 277 {
278 Ecore_Event_Signal_User *e; 278 Ecore_Event_Signal_User *e;
@@ -292,8 +292,8 @@ _ecore_signal_call(void)
292 sigusr1_count = 0; 292 sigusr1_count = 0;
293 293
294 if (sigusr2_count > MAXSIGQ) 294 if (sigusr2_count > MAXSIGQ)
295 printf("ECORE WARNING. %i SIGUSR2 in queue. max queue size %i. losing " 295 WRN("%i SIGUSR2 in queue. max queue size %i. losing "
296 "siginfo for extra signals.\n", sigusr2_count, MAXSIGQ); 296 "siginfo for extra signals.", sigusr2_count, MAXSIGQ);
297 for (n = 0; n < sigusr2_count; n++) 297 for (n = 0; n < sigusr2_count; n++)
298 { 298 {
299 Ecore_Event_Signal_User *e; 299 Ecore_Event_Signal_User *e;
@@ -313,8 +313,8 @@ _ecore_signal_call(void)
313 sigusr2_count = 0; 313 sigusr2_count = 0;
314 314
315 if (sighup_count > MAXSIGQ) 315 if (sighup_count > MAXSIGQ)
316 printf("ECORE WARNING. %i SIGHUP in queue. max queue size %i. losing " 316 WRN("%i SIGHUP in queue. max queue size %i. losing "
317 "siginfo for extra signals.\n", sighup_count, MAXSIGQ); 317 "siginfo for extra signals.", sighup_count, MAXSIGQ);
318 for (n = 0; n < sighup_count; n++) 318 for (n = 0; n < sighup_count; n++)
319 { 319 {
320 Ecore_Event_Signal_Hup *e; 320 Ecore_Event_Signal_Hup *e;
@@ -332,8 +332,8 @@ _ecore_signal_call(void)
332 sighup_count = 0; 332 sighup_count = 0;
333 333
334 if (sigquit_count > MAXSIGQ) 334 if (sigquit_count > MAXSIGQ)
335 printf("ECORE WARNING. %i SIGQUIT in queue. max queue size %i. losing " 335 WRN("%i SIGQUIT in queue. max queue size %i. losing "
336 "siginfo for extra signals.\n", sigquit_count, MAXSIGQ); 336 "siginfo for extra signals.", sigquit_count, MAXSIGQ);
337 for (n = 0; n < sigquit_count; n++) 337 for (n = 0; n < sigquit_count; n++)
338 { 338 {
339 Ecore_Event_Signal_Exit *e; 339 Ecore_Event_Signal_Exit *e;
@@ -353,8 +353,8 @@ _ecore_signal_call(void)
353 sigquit_count = 0; 353 sigquit_count = 0;
354 354
355 if (sigint_count > MAXSIGQ) 355 if (sigint_count > MAXSIGQ)
356 printf("ECORE WARNING. %i SIGINT in queue. max queue size %i. losing " 356 WRN("%i SIGINT in queue. max queue size %i. losing "
357 "siginfo for extra signals.\n", sigint_count, MAXSIGQ); 357 "siginfo for extra signals.", sigint_count, MAXSIGQ);
358 for (n = 0; n < sigint_count; n++) 358 for (n = 0; n < sigint_count; n++)
359 { 359 {
360 Ecore_Event_Signal_Exit *e; 360 Ecore_Event_Signal_Exit *e;
@@ -374,8 +374,8 @@ _ecore_signal_call(void)
374 sigint_count = 0; 374 sigint_count = 0;
375 375
376 if (sigterm_count > MAXSIGQ) 376 if (sigterm_count > MAXSIGQ)
377 printf("ECORE WARNING. %i SIGTERM in queue. max queue size %i. losing " 377 WRN("%i SIGTERM in queue. max queue size %i. losing "
378 "siginfo for extra signals.\n", sigterm_count, MAXSIGQ); 378 "siginfo for extra signals.", sigterm_count, MAXSIGQ);
379 for (n = 0; n < sigterm_count; n++) 379 for (n = 0; n < sigterm_count; n++)
380 { 380 {
381 Ecore_Event_Signal_Exit *e; 381 Ecore_Event_Signal_Exit *e;
@@ -396,8 +396,8 @@ _ecore_signal_call(void)
396 396
397#ifdef SIGPWR 397#ifdef SIGPWR
398 if (sigpwr_count > MAXSIGQ) 398 if (sigpwr_count > MAXSIGQ)
399 printf("ECORE WARNING. %i SIGPWR in queue. max queue size %i. losing " 399 WRN("%i SIGPWR in queue. max queue size %i. losing "
400 "siginfo for extra signals.\n", sigpwr_count, MAXSIGQ); 400 "siginfo for extra signals.", sigpwr_count, MAXSIGQ);
401 for (n = 0; n < sigpwr_count; n++) 401 for (n = 0; n < sigpwr_count; n++)
402 { 402 {
403 Ecore_Event_Signal_Power *e; 403 Ecore_Event_Signal_Power *e;
@@ -419,8 +419,8 @@ _ecore_signal_call(void)
419 for (i = 0; i < num; i++) 419 for (i = 0; i < num; i++)
420 { 420 {
421 if (sigrt_count[i] > MAXSIGQ) 421 if (sigrt_count[i] > MAXSIGQ)
422 printf("ECORE WARNING. %i SIGRT%i in queue. max queue size %i. losing " 422 WRN("%i SIGRT%i in queue. max queue size %i. losing "
423 "siginfo for extra signals.\n", i + 1, sigrt_count[i], MAXSIGQ); 423 "siginfo for extra signals.", i + 1, sigrt_count[i], MAXSIGQ);
424 for (n = 0; n < sigrt_count[i]; n++) 424 for (n = 0; n < sigrt_count[i]; n++)
425 { 425 {
426 Ecore_Event_Signal_Realtime *e; 426 Ecore_Event_Signal_Realtime *e;
diff --git a/legacy/ecore/src/lib/ecore/ecore_timer.c b/legacy/ecore/src/lib/ecore/ecore_timer.c
index 7a884ac3a4..3a5d074b3f 100644
--- a/legacy/ecore/src/lib/ecore/ecore_timer.c
+++ b/legacy/ecore/src/lib/ecore/ecore_timer.c
@@ -68,7 +68,7 @@ ecore_timer_precision_set(double value)
68{ 68{
69 if (value < 0.0) 69 if (value < 0.0)
70 { 70 {
71 fprintf(stderr, "ERROR: precision %f less than zero, ignored\n", value); 71 ERR("Precision %f less than zero, ignored", value);
72 return; 72 return;
73 } 73 }
74 precision = value; 74 precision = value;
diff --git a/legacy/ecore/src/lib/ecore/ecore_value.c b/legacy/ecore/src/lib/ecore/ecore_value.c
index ea098f683a..d1392c7ad1 100644
--- a/legacy/ecore/src/lib/ecore/ecore_value.c
+++ b/legacy/ecore/src/lib/ecore/ecore_value.c
@@ -53,13 +53,12 @@ EAPI const unsigned int ecore_prime_table[] =
53EAPI void 53EAPI void
54ecore_print_warning(const char *function, const char *sparam) 54ecore_print_warning(const char *function, const char *sparam)
55{ 55{
56 fprintf(stderr, "***** Developer Warning ***** :\n" 56 WRN("***** Developer Warning ***** :\n"
57 "\tThis program is calling:\n\n" 57 "\tThis program is calling:\n\n"
58 "\t%s();\n\n" 58 "\t%s();\n\n"
59 "\tWith the parameter:\n\n" 59 "\tWith the parameter:\n\n"
60 "\t%s\n\n" 60 "\t%s\n\n"
61 "\tbeing NULL. Please fix your program.\n", function, sparam); 61 "\tbeing NULL. Please fix your program.", function, sparam);
62 fflush(stderr);
63 if (getenv("ECORE_ERROR_ABORT")) abort(); 62 if (getenv("ECORE_ERROR_ABORT")) abort();
64} 63}
65 64
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con.c b/legacy/ecore/src/lib/ecore_con/ecore_con.c
index 9ae3f027aa..562c515425 100644
--- a/legacy/ecore/src/lib/ecore_con/ecore_con.c
+++ b/legacy/ecore/src/lib/ecore_con/ecore_con.c
@@ -65,7 +65,7 @@ EAPI int ECORE_CON_EVENT_SERVER_DATA = 0;
65 65
66static Eina_List *servers = NULL; 66static Eina_List *servers = NULL;
67static int _ecore_con_init_count = 0; 67static int _ecore_con_init_count = 0;
68 68int _ecore_con_log_dom = -1;
69#define LENGTH_OF_SOCKADDR_UN(s) (strlen((s)->sun_path) + (size_t)(((struct sockaddr_un *)NULL)->sun_path)) 69#define LENGTH_OF_SOCKADDR_UN(s) (strlen((s)->sun_path) + (size_t)(((struct sockaddr_un *)NULL)->sun_path))
70#define LENGTH_OF_ABSTRACT_SOCKADDR_UN(s, path) (strlen(path) + 1 + (size_t)(((struct sockaddr_un *)NULL)->sun_path)) 70#define LENGTH_OF_ABSTRACT_SOCKADDR_UN(s, path) (strlen(path) + 1 + (size_t)(((struct sockaddr_un *)NULL)->sun_path))
71 71
@@ -91,6 +91,13 @@ ecore_con_init(void)
91 if (!ecore_init()) 91 if (!ecore_init())
92 return --_ecore_con_init_count; 92 return --_ecore_con_init_count;
93 93
94 _ecore_con_log_dom = eina_log_domain_register("EcoreCon", ECORE_DEFAULT_LOG_COLOR);
95 if(_ecore_con_log_dom < 0)
96 {
97 EINA_LOG_ERR("Impossible to create a log domain foe Ecore Con.");
98 ecore_shutdown();
99 return --_ecore_con_init_count;
100 }
94 ECORE_CON_EVENT_CLIENT_ADD = ecore_event_type_new(); 101 ECORE_CON_EVENT_CLIENT_ADD = ecore_event_type_new();
95 ECORE_CON_EVENT_CLIENT_DEL = ecore_event_type_new(); 102 ECORE_CON_EVENT_CLIENT_DEL = ecore_event_type_new();
96 ECORE_CON_EVENT_SERVER_ADD = ecore_event_type_new(); 103 ECORE_CON_EVENT_SERVER_ADD = ecore_event_type_new();
@@ -117,14 +124,15 @@ ecore_con_shutdown(void)
117{ 124{
118 if (--_ecore_con_init_count != 0) 125 if (--_ecore_con_init_count != 0)
119 return _ecore_con_init_count; 126 return _ecore_con_init_count;
120 127
121 while (servers) 128 while (servers)
122 _ecore_con_server_free(eina_list_data_get(servers)); 129 _ecore_con_server_free(eina_list_data_get(servers));
123 130
124 ecore_con_info_shutdown(); 131 ecore_con_info_shutdown();
125 ecore_con_dns_shutdown(); 132 ecore_con_dns_shutdown();
126 ecore_con_ssl_shutdown(); 133 ecore_con_ssl_shutdown();
127 134 eina_log_domain_unregister(_ecore_con_log_dom);
135 _ecore_con_log_dom = -1;
128 ecore_shutdown(); 136 ecore_shutdown();
129 137
130 return _ecore_con_init_count; 138 return _ecore_con_init_count;
@@ -252,7 +260,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type, const char *name, int port,
252 socket_unix.sun_path[0] = '\0'; 260 socket_unix.sun_path[0] = '\0';
253 socket_unix_len = LENGTH_OF_ABSTRACT_SOCKADDR_UN(&socket_unix, name); 261 socket_unix_len = LENGTH_OF_ABSTRACT_SOCKADDR_UN(&socket_unix, name);
254#else 262#else
255 fprintf(stderr, "Your system does not support abstract sockets!\n"); 263 ERR("Your system does not support abstract sockets!");
256 goto error_umask; 264 goto error_umask;
257#endif 265#endif
258 } 266 }
@@ -418,7 +426,7 @@ ecore_con_server_connect(Ecore_Con_Type compl_type, const char *name, int port,
418 socket_unix.sun_path[0] = '\0'; 426 socket_unix.sun_path[0] = '\0';
419 socket_unix_len = LENGTH_OF_ABSTRACT_SOCKADDR_UN(&socket_unix, name); 427 socket_unix_len = LENGTH_OF_ABSTRACT_SOCKADDR_UN(&socket_unix, name);
420#else 428#else
421 fprintf(stderr, "Your system does not support abstract sockets!\n"); 429 WRN("Your system does not support abstract sockets!");
422 goto error; 430 goto error;
423#endif 431#endif
424 } 432 }
@@ -887,10 +895,10 @@ _ecore_con_server_free(Ecore_Con_Server *svr)
887 t = ecore_time_get(); 895 t = ecore_time_get();
888 if ((t - t_start) > 0.5) 896 if ((t - t_start) > 0.5)
889 { 897 {
890 printf("ECORE_CON: EEK - stuck in _ecore_con_server_free() trying\n" 898 WRN("ECORE_CON: EEK - stuck in _ecore_con_server_free() trying\n"
891 " to flush data out from the server, and have been for\n" 899 " to flush data out from the server, and have been for\n"
892 " %1.1f seconds. This is taking too long. Aborting flush.\n", 900 " %1.1f seconds. This is taking too long. Aborting flush.",
893 (t - t_start)); 901 (t - t_start));
894 break; 902 break;
895 } 903 }
896 } 904 }
@@ -922,10 +930,10 @@ _ecore_con_client_free(Ecore_Con_Client *cl)
922 t = ecore_time_get(); 930 t = ecore_time_get();
923 if ((t - t_start) > 0.5) 931 if ((t - t_start) > 0.5)
924 { 932 {
925 printf("ECORE_CON: EEK - stuck in _ecore_con_client_free() trying\n" 933 WRN("EEK - stuck in _ecore_con_client_free() trying\n"
926 " to flush data out from the client, and have been for\n" 934 " to flush data out from the client, and have been for\n"
927 " %1.1f seconds. This is taking too long. Aborting flush.\n", 935 " %1.1f seconds. This is taking too long. Aborting flush.",
928 (t - t_start)); 936 (t - t_start));
929 break; 937 break;
930 } 938 }
931 } 939 }
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_private.h b/legacy/ecore/src/lib/ecore_con/ecore_con_private.h
index 6f0ba1056c..17aebb2d32 100644
--- a/legacy/ecore/src/lib/ecore_con/ecore_con_private.h
+++ b/legacy/ecore/src/lib/ecore_con/ecore_con_private.h
@@ -23,6 +23,32 @@
23 23
24#define READBUFSIZ 65536 24#define READBUFSIZ 65536
25 25
26extern int _ecore_con_log_dom ;
27#ifdef ERR
28# undef ERR
29#endif
30#define ERR(...) EINA_LOG_DOM_ERR(_ecore_con_log_dom, __VA_ARGS__)
31
32#ifdef DBG
33# undef DBG
34#endif
35#define DBG(...) EINA_LOG_DOM_DBG(_ecore_con_log_dom, __VA_ARGS__)
36
37#ifdef INF
38# undef INF
39#endif
40#define INF(...) EINA_LOG_DOM_INFO(_ecore_con_log_dom, __VA_ARGS__)
41
42#ifdef WRN
43# undef WRN
44#endif
45#define WRN(...) EINA_LOG_DOM_WARN(_ecore_con_log_dom, __VA_ARGS__)
46
47#ifdef CRIT
48# undef CRIT
49#endif
50#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_con_log_dom, __VA_ARGS__)
51
26typedef enum _Ecore_Con_State 52typedef enum _Ecore_Con_State
27 { 53 {
28 ECORE_CON_CONNECTED, 54 ECORE_CON_CONNECTED,
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con_url.c b/legacy/ecore/src/lib/ecore_con/ecore_con_url.c
index ccfb9801e9..482912ef7f 100644
--- a/legacy/ecore/src/lib/ecore_con/ecore_con_url.c
+++ b/legacy/ecore/src/lib/ecore_con/ecore_con_url.c
@@ -1035,7 +1035,7 @@ _ecore_con_url_read_cb(void *ptr, size_t size, size_t nitems, void *stream)
1035 fclose((FILE*)stream); 1035 fclose((FILE*)stream);
1036 return 0; 1036 return 0;
1037 } 1037 }
1038 fprintf(stderr, "*** We read %zu bytes from file\n", retcode); 1038 INF("*** We read %zu bytes from file", retcode);
1039 return retcode; 1039 return retcode;
1040} 1040}
1041 1041
diff --git a/legacy/ecore/src/lib/ecore_config/ecore_config.c b/legacy/ecore/src/lib/ecore_config/ecore_config.c
index 8e6650ff71..bdf52d5118 100644
--- a/legacy/ecore/src/lib/ecore_config/ecore_config.c
+++ b/legacy/ecore/src/lib/ecore_config/ecore_config.c
@@ -23,7 +23,7 @@
23#include "ecore_config_ipc.h" 23#include "ecore_config_ipc.h"
24 24
25#include "ecore_config_util.h" 25#include "ecore_config_util.h"
26 26int _ecore_config_log_dom = -1;
27int DEBUG = 0; 27int DEBUG = 0;
28EAPI Ecore_Config_Server *__ecore_config_server_global = NULL; 28EAPI Ecore_Config_Server *__ecore_config_server_global = NULL;
29EAPI Ecore_Config_Server *__ecore_config_server_local = NULL; 29EAPI Ecore_Config_Server *__ecore_config_server_local = NULL;
@@ -336,7 +336,7 @@ ecore_config_as_string_get(const char *key)
336 val = NULL; 336 val = NULL;
337 r = NULL; 337 r = NULL;
338 if (!(e = ecore_config_get(key))) 338 if (!(e = ecore_config_get(key)))
339 E(0, "no such property, \"%s\"...\n", key); 339 ERR(0, "no such property, \"%s\"...", key);
340 else 340 else
341 { 341 {
342 switch (e->type) 342 switch (e->type)
@@ -391,15 +391,13 @@ ecore_config_bound(Ecore_Config_Prop * e)
391 { 391 {
392 if ((e->val < e->lo)) 392 if ((e->val < e->lo))
393 { 393 {
394 E(0, 394 WRN("ecore_config_bounds(\"%s\",%ld): value out of range; adjusted to %ld...",
395 "ecore_config_bounds(\"%s\",%ld): value out of range; adjusted to %ld...\n",
396 e->key, e->val, e->lo); 395 e->key, e->val, e->lo);
397 e->val = e->lo; 396 e->val = e->lo;
398 } 397 }
399 else if ((e->val > e->hi)) 398 else if ((e->val > e->hi))
400 { 399 {
401 E(0, 400 WRN("ecore_config_bounds(\"%s\",%ld): value out of range; adjusted to %ld...",
402 "ecore_config_bounds(\"%s\",%ld): value out of range; adjusted to %ld...\n",
403 e->key, e->val, e->hi); 401 e->key, e->val, e->hi);
404 e->val = e->hi; 402 e->val = e->hi;
405 } 403 }
@@ -415,14 +413,12 @@ ecore_config_bound(Ecore_Config_Prop * e)
415 if (v != e->val) 413 if (v != e->val)
416 { 414 {
417 if (e->type == ECORE_CONFIG_FLT) 415 if (e->type == ECORE_CONFIG_FLT)
418 E(0, 416 WRN("ecore_config_bound(\"%s\"): float value %f not a multiple of %f, adjusted to %f...",
419 "ecore_config_bound(\"%s\"): float value %f not a multiple of %f, adjusted to %f...\n",
420 e->key, ((double)e->val) / ECORE_CONFIG_FLOAT_PRECISION, 417 e->key, ((double)e->val) / ECORE_CONFIG_FLOAT_PRECISION,
421 ((double)e->step) / ECORE_CONFIG_FLOAT_PRECISION, 418 ((double)e->step) / ECORE_CONFIG_FLOAT_PRECISION,
422 ((double)v) / ECORE_CONFIG_FLOAT_PRECISION); 419 ((double)v) / ECORE_CONFIG_FLOAT_PRECISION);
423 else 420 else
424 E(0, 421 WRN("ecore_config_bound(\"%s\"): integer value %ld not a multiple of %ld, adjusted to %ld...",
425 "ecore_config_bound(\"%s\"): integer value %ld not a multiple of %ld, adjusted to %ld...\n",
426 e->key, e->val, e->step, v); 422 e->key, e->val, e->step, v);
427 ret = ECORE_CONFIG_ERR_SUCC; 423 ret = ECORE_CONFIG_ERR_SUCC;
428 e->val = v; 424 e->val = v;
@@ -677,9 +673,8 @@ ecore_config_typed_set(const char *key, const void *val, int type)
677 } 673 }
678 else 674 else
679 { 675 {
680 E(0, 676 ERR("ecore_config_typed_set(\"%s\"): ecore_config_typed_val() failed: %d",
681 "ecore_config_typed_set(\"%s\"): ecore_config_typed_val() failed: %d\n", 677 key, ret);
682 key, ret);
683 } 678 }
684 679
685 return ret; 680 return ret;
@@ -1157,8 +1152,8 @@ ecore_config_theme_default(const char *key, const char *val)
1157EAPI int 1152EAPI int
1158ecore_config_struct_create(const char *key) 1153ecore_config_struct_create(const char *key)
1159{ 1154{
1160 printf("WARNING: you are using ecore_config structures. These are very young"); 1155 WRN("you are using ecore_config structures. These are very young");
1161 printf(" and not complete - you have been warned"); 1156 WRN(" and not complete - you have been warned");
1162 1157
1163 return ecore_config_typed_default(key, NULL, ECORE_CONFIG_SCT); 1158 return ecore_config_typed_default(key, NULL, ECORE_CONFIG_SCT);
1164} 1159}
@@ -1351,7 +1346,7 @@ ecore_config_struct_get(const char *key, void *data)
1351 ptr += sizeof(int); 1346 ptr += sizeof(int);
1352 break; 1347 break;
1353 default: 1348 default:
1354 printf("ARGH - STRUCT coding not implemented yet\n"); 1349 WRN("ARGH - STRUCT coding not implemented yet");
1355 } 1350 }
1356 l = eina_list_next(l); 1351 l = eina_list_next(l);
1357 } 1352 }
@@ -1391,13 +1386,13 @@ ecore_config_listen(const char *name, const char *key,
1391 1386
1392 if (ret != ECORE_CONFIG_ERR_SUCC) 1387 if (ret != ECORE_CONFIG_ERR_SUCC)
1393 { 1388 {
1394 E(0, "ecore_config_listen: ecore_config_add(\"%s\") failed: %d\n", 1389 ERR("ecore_config_listen: ecore_config_add(\"%s\") failed: %d",
1395 key, ret); 1390 key, ret);
1396 return ret; 1391 return ret;
1397 } 1392 }
1398 if (!(e = ecore_config_get(key))) 1393 if (!(e = ecore_config_get(key)))
1399 { 1394 {
1400 E(0, "ecore_config_listen: list of properties corrupted!?\n"); 1395 ERR("ecore_config_listen: list of properties corrupted!?");
1401 return ECORE_CONFIG_ERR_FAIL; 1396 return ECORE_CONFIG_ERR_FAIL;
1402 } 1397 }
1403 } 1398 }
@@ -1405,8 +1400,7 @@ ecore_config_listen(const char *name, const char *key,
1405 for (l = e->listeners; l; l = l->next) 1400 for (l = e->listeners; l; l = l->next)
1406 if (!strcmp(l->name, name) || (l->listener == listener)) 1401 if (!strcmp(l->name, name) || (l->listener == listener))
1407 { 1402 {
1408 E(1, 1403 ERR("ecore_config_listen: %s is already listening for changes of %s...",
1409 "ecore_config_listen: %s is already listening for changes of %s...\n",
1410 name, key); 1404 name, key);
1411 return ECORE_CONFIG_ERR_IGNORED; 1405 return ECORE_CONFIG_ERR_IGNORED;
1412 } 1406 }
@@ -1414,7 +1408,7 @@ ecore_config_listen(const char *name, const char *key,
1414 if (!(l = malloc(sizeof(Ecore_Config_Listener_List)))) 1408 if (!(l = malloc(sizeof(Ecore_Config_Listener_List))))
1415 return ECORE_CONFIG_ERR_OOM; 1409 return ECORE_CONFIG_ERR_OOM;
1416 1410
1417 E(1, "registering listener \"%s\" for \"%s\" (%d)...\n", name, key, e->type); 1411 ERR("registering listener \"%s\" for \"%s\" (%d)...", name, key, e->type);
1418 1412
1419 memset(l, 0, sizeof(Ecore_Config_Listener_List)); 1413 memset(l, 0, sizeof(Ecore_Config_Listener_List));
1420 1414
@@ -1680,6 +1674,12 @@ ecore_config_init(const char *name)
1680{ 1674{
1681 char *path; 1675 char *path;
1682 Ecore_Config_Prop *list; 1676 Ecore_Config_Prop *list;
1677 _ecore_config_log_dom = eina_log_domain_register("EcoreConfig", ECORE_DEFAULT_LOG_COLOR);
1678 if(_ecore_config_log_dom < 0)
1679 {
1680 EINA_LOG_ERR("Impossible to create a log domain for the Ecore config module.");
1681 return -1;
1682 }
1683 _ecore_config_system_init_no_load(); 1683 _ecore_config_system_init_no_load();
1684 1684
1685 __ecore_config_app_name = strdup(name); 1685 __ecore_config_app_name = strdup(name);
@@ -1836,6 +1836,8 @@ ecore_config_system_shutdown(void)
1836 free(__ecore_config_bundle_local); 1836 free(__ecore_config_bundle_local);
1837 free(__ecore_config_server_local); 1837 free(__ecore_config_server_local);
1838 free(__ecore_config_server_global); 1838 free(__ecore_config_server_global);
1839 eina_log_domain_unregister(_ecore_config_log_dom);
1840 _ecore_config_log_dom = -1;
1839 return ret; 1841 return ret;
1840} 1842}
1841 1843
@@ -1862,7 +1864,7 @@ __ecore_argbstr_to_long(const char *argb, long *v)
1862 1864
1863 if(*l) 1865 if(*l)
1864 { 1866 {
1865 E(0, "ecore_config_val: value \"%s\" not a valid hexadecimal RGB value?\n", argb); 1867 ERR("ecore_config_val: value \"%s\" not a valid hexadecimal RGB value?", argb);
1866 return NULL; 1868 return NULL;
1867 } 1869 }
1868 1870
diff --git a/legacy/ecore/src/lib/ecore_config/ecore_config_db.c b/legacy/ecore/src/lib/ecore_config/ecore_config_db.c
index 96bcb0b0f5..bb5e12a754 100644
--- a/legacy/ecore/src/lib/ecore_config/ecore_config_db.c
+++ b/legacy/ecore/src/lib/ecore_config/ecore_config_db.c
@@ -182,10 +182,10 @@ _ecore_config_db_read(Ecore_Config_DB_File *db, const char *key)
182 ecore_config_typed_set(key, (void *)value, type); 182 ecore_config_typed_set(key, (void *)value, type);
183 break; 183 break;
184 case ECORE_CONFIG_SCT: 184 case ECORE_CONFIG_SCT:
185 printf("loading struct %s\n", key); 185 INF("loading struct %s", key);
186 break; 186 break;
187 default: 187 default:
188 E(0, "Type %d not handled\n", type); 188 WRN("Type %d not handled", type);
189 } 189 }
190 free(data); 190 free(data);
191 return 1; 191 return 1;
@@ -263,7 +263,7 @@ _ecore_config_db_write(Ecore_Config_DB_File *db, Ecore_Config_Prop *e)
263 val = _ecore_config_argbstr_get(e); 263 val = _ecore_config_argbstr_get(e);
264 break; 264 break;
265 default: 265 default:
266 E(0, "Type %d not handled\n", e->type); 266 WRN("Type %d not handled", e->type);
267 } 267 }
268 268
269 if (prev_locale) 269 if (prev_locale)
diff --git a/legacy/ecore/src/lib/ecore_config/ecore_config_extra.c b/legacy/ecore/src/lib/ecore_config/ecore_config_extra.c
index 4b8dce1411..10d22a66c5 100644
--- a/legacy/ecore/src/lib/ecore_config/ecore_config_extra.c
+++ b/legacy/ecore/src/lib/ecore_config/ecore_config_extra.c
@@ -15,7 +15,7 @@
15 15
16#include "Ecore_Config.h" 16#include "Ecore_Config.h"
17#include "Ecore.h" 17#include "Ecore.h"
18 18#include "ecore_config_private.h"
19typedef struct __Ecore_Config_Arg_Callback _Ecore_Config_Arg_Callback; 19typedef struct __Ecore_Config_Arg_Callback _Ecore_Config_Arg_Callback;
20struct __Ecore_Config_Arg_Callback 20struct __Ecore_Config_Arg_Callback
21{ 21{
@@ -531,9 +531,9 @@ ecore_config_args_display(void)
531 _Ecore_Config_Arg_Callback *callbacks; 531 _Ecore_Config_Arg_Callback *callbacks;
532 532
533 if (__ecore_config_app_description) 533 if (__ecore_config_app_description)
534 printf("%s\n\n", __ecore_config_app_description); 534 ERR("%s\n\n", __ecore_config_app_description);
535 printf("Supported Options:\n"); 535 ERR("Supported Options:");
536 printf(" -h, --help\t Print this text\n"); 536 ERR(" -h, --help\t Print this text");
537 if (!__ecore_config_bundle_local) 537 if (!__ecore_config_bundle_local)
538 return; 538 return;
539 props = __ecore_config_bundle_local->data; 539 props = __ecore_config_bundle_local->data;
@@ -545,7 +545,7 @@ ecore_config_args_display(void)
545 props = props->next; 545 props = props->next;
546 continue; 546 continue;
547 } 547 }
548 printf(" %c%c%c --%s\t%s %s\n", props->short_opt ? '-' : ' ', 548 INF(" %c%c%c --%s\t%s %s", props->short_opt ? '-' : ' ',
549 props->short_opt ? props->short_opt : ' ', 549 props->short_opt ? props->short_opt : ' ',
550 props->short_opt ? ',' : ' ', 550 props->short_opt ? ',' : ' ',
551 props->long_opt ? props->long_opt : props->key, 551 props->long_opt ? props->long_opt : props->key,
@@ -558,7 +558,7 @@ ecore_config_args_display(void)
558 callbacks = _ecore_config_arg_callbacks; 558 callbacks = _ecore_config_arg_callbacks;
559 while (callbacks) 559 while (callbacks)
560 { 560 {
561 printf(" %c%c%c --%s\t%s %s\n", callbacks->short_opt ? '-' : ' ', 561 INF(" %c%c%c --%s\t%s %s", callbacks->short_opt ? '-' : ' ',
562 callbacks->short_opt ? callbacks->short_opt : ' ', 562 callbacks->short_opt ? callbacks->short_opt : ' ',
563 callbacks->short_opt ? ',' : ' ', 563 callbacks->short_opt ? ',' : ' ',
564 callbacks->long_opt ? callbacks->long_opt : "", 564 callbacks->long_opt ? callbacks->long_opt : "",
@@ -577,9 +577,9 @@ ecore_config_parse_set(Ecore_Config_Prop * prop, char *arg, char *opt,
577 if (!arg) 577 if (!arg)
578 { 578 {
579 if (opt) 579 if (opt)
580 printf("Missing expected argument for option --%s\n", opt); 580 ERR("Missing expected argument for option --%s", opt);
581 else 581 else
582 printf("Missing expected argument for option -%c\n", opt2); 582 ERR("Missing expected argument for option -%c", opt2);
583 return ECORE_CONFIG_PARSE_EXIT; 583 return ECORE_CONFIG_PARSE_EXIT;
584 } 584 }
585 else 585 else
@@ -652,7 +652,7 @@ ecore_config_args_parse(void)
652 652
653 if (*arg != '-') 653 if (*arg != '-')
654 { 654 {
655 printf("Unexpected attribute \"%s\"\n", arg); 655 ERR("Unexpected attribute \"%s\"", arg);
656 nextarg++; 656 nextarg++;
657 continue; 657 continue;
658 } 658 }
@@ -705,7 +705,7 @@ ecore_config_args_parse(void)
705 { 705 {
706 if (!argv[++nextarg]) 706 if (!argv[++nextarg])
707 { 707 {
708 printf("Missing expected argument for option --%s\n", long_opt); 708 ERR("Missing expected argument for option --%s", long_opt);
709 return ECORE_CONFIG_PARSE_EXIT; 709 return ECORE_CONFIG_PARSE_EXIT;
710 } 710 }
711 callback->func(argv[nextarg], callback->data); 711 callback->func(argv[nextarg], callback->data);
@@ -717,8 +717,8 @@ ecore_config_args_parse(void)
717 } 717 }
718 if (!found) 718 if (!found)
719 { 719 {
720 printf("Unrecognised option \"%s\"\n", long_opt); 720 ERR("Unrecognised option \"%s\"", long_opt);
721 printf("Try using -h or --help for more information.\n\n"); 721 ERR("Try using -h or --help for more information.\n");
722 return ECORE_CONFIG_PARSE_EXIT; 722 return ECORE_CONFIG_PARSE_EXIT;
723 } 723 }
724 } 724 }
@@ -768,7 +768,7 @@ ecore_config_args_parse(void)
768 { 768 {
769 if (!argv[++nextarg]) 769 if (!argv[++nextarg])
770 { 770 {
771 printf("Missing expected argument for option -%c\n", short_opt); 771 ERR("Missing expected argument for option -%c", short_opt);
772 return ECORE_CONFIG_PARSE_EXIT; 772 return ECORE_CONFIG_PARSE_EXIT;
773 } 773 }
774 callback->func(argv[nextarg], callback->data); 774 callback->func(argv[nextarg], callback->data);
@@ -780,9 +780,8 @@ ecore_config_args_parse(void)
780 } 780 }
781 if (!found) 781 if (!found)
782 { 782 {
783 printf("Unrecognised option '%c'\n", short_opt); 783 ERR("Unrecognised option '%c'", short_opt);
784 printf 784 ERR("Try using -h or --help for more information.\n");
785 ("Try using -h or --help for more information.\n\n");
786 return ECORE_CONFIG_PARSE_EXIT; 785 return ECORE_CONFIG_PARSE_EXIT;
787 } 786 }
788 } 787 }
diff --git a/legacy/ecore/src/lib/ecore_config/ecore_config_ipc_ecore.c b/legacy/ecore/src/lib/ecore_config/ecore_config_ipc_ecore.c
index ebe3df6881..662bc090b7 100644
--- a/legacy/ecore/src/lib/ecore_config/ecore_config_ipc_ecore.c
+++ b/legacy/ecore/src/lib/ecore_config/ecore_config_ipc_ecore.c
@@ -49,7 +49,7 @@ _ecore_config_ipc_ecore_string_get(char **m, char **r)
49 *r = q; 49 *r = q;
50 q += l; 50 q += l;
51 *m = q; 51 *m = q;
52 E(1, "IPC/eCore: got string-%d \"%s\"\n", l, *r); 52 WRN("IPC/eCore: got string-%d \"%s\"", l, *r);
53 return ECORE_CONFIG_ERR_SUCC; 53 return ECORE_CONFIG_ERR_SUCC;
54} 54}
55 55
@@ -139,7 +139,7 @@ _ecore_config_ipc_ecore_send(Ecore_Ipc_Event_Client_Data * e, int code,
139 int len = reply ? strlen(reply) + 1 : 0; 139 int len = reply ? strlen(reply) + 1 : 0;
140 140
141 our_ref++; 141 our_ref++;
142 E(1, "IPC/eCore: replying [0,0] %d IRT %d => %d {\"%s\":%d}\n", our_ref, 142 WRN("IPC/eCore: replying [0,0] %d IRT %d => %d {\"%s\":%d}", our_ref,
143 e->ref, code, reply ? reply : "", len); 143 e->ref, code, reply ? reply : "", len);
144 return ecore_ipc_client_send(e->client, 0, 0, our_ref, e->ref, code, reply, 144 return ecore_ipc_client_send(e->client, 0, 0, our_ref, e->ref, code, reply,
145 len); 145 len);
@@ -160,7 +160,7 @@ _ecore_config_ipc_ecore_handle_request(Ecore_Ipc_Server * server,
160 serial = e->minor; 160 serial = e->minor;
161 r = NULL; 161 r = NULL;
162 m = (char *)e->data; 162 m = (char *)e->data;
163 E(1, "IPC/eCore: client sent: [%d,%d] #%d (%d) @ %p\n", e->major, e->minor, 163 INF("IPC/eCore: client sent: [%d,%d] #%d (%d) @ %p", e->major, e->minor,
164 e->ref, e->size, server); 164 e->ref, e->size, server);
165 165
166 switch (e->major) 166 switch (e->major)
@@ -247,7 +247,7 @@ _ecore_config_ipc_client_add(void *data, int type __UNUSED__, void *event)
247 if (*server != ecore_ipc_client_server_get(e->client)) 247 if (*server != ecore_ipc_client_server_get(e->client))
248 return 1; 248 return 1;
249 249
250 E(1, "IPC/eCore: Client connected. @ %p\n", server); 250 INF("IPC/eCore: Client connected. @ %p", server);
251 return 1; 251 return 1;
252} 252}
253 253
@@ -263,7 +263,7 @@ _ecore_config_ipc_client_del(void *data, int type __UNUSED__, void *event)
263 if (*server != ecore_ipc_client_server_get(e->client)) 263 if (*server != ecore_ipc_client_server_get(e->client))
264 return 1; 264 return 1;
265 265
266 E(1, "IPC/eCore: Client disconnected. @ %p\n", server); 266 INF("IPC/eCore: Client disconnected. @ %p", server);
267 return 1; 267 return 1;
268} 268}
269 269
@@ -317,7 +317,7 @@ _ecore_config_ipc_ecore_init(const char *pipe_name, void **data)
317 317
318 if (!stat(socket, &st)) 318 if (!stat(socket, &st))
319 { 319 {
320 E(0, "IPC/eCore: pipe \"%s\" already exists!?\n", socket); 320 INF("IPC/eCore: pipe \"%s\" already exists!?", socket);
321/* if(unlink(buf)) 321/* if(unlink(buf))
322 E(0,"IPC/eCore: could not remove pipe \"%s\": %d\n",buf,errno); }}*/ 322 E(0,"IPC/eCore: could not remove pipe \"%s\": %d\n",buf,errno); }}*/
323 port++; 323 port++;
@@ -338,7 +338,7 @@ _ecore_config_ipc_ecore_init(const char *pipe_name, void **data)
338 338
339 if (server) 339 if (server)
340 { 340 {
341 E(1, "IPC/eCore: Server is listening on %s.\n", pipe_name); 341 INF("IPC/eCore: Server is listening on %s.", pipe_name);
342 } 342 }
343 343
344 return ECORE_CONFIG_ERR_SUCC; 344 return ECORE_CONFIG_ERR_SUCC;
diff --git a/legacy/ecore/src/lib/ecore_config/ecore_config_ipc_main.c b/legacy/ecore/src/lib/ecore_config/ecore_config_ipc_main.c
index 704878f330..edb7ed1629 100644
--- a/legacy/ecore/src/lib/ecore_config/ecore_config_ipc_main.c
+++ b/legacy/ecore/src/lib/ecore_config/ecore_config_ipc_main.c
@@ -132,8 +132,8 @@ _ecore_config_ipc_prop_set(Ecore_Config_Server * srv, const long serial,
132 132
133 theme = ecore_config_bundle_by_serial_get(srv, serial); 133 theme = ecore_config_bundle_by_serial_get(srv, serial);
134 ret = ecore_config_set(key, (char *)val); 134 ret = ecore_config_set(key, (char *)val);
135 E(1, "ipc.prop.set(%s->%s,\"%s\") => %d\n", theme ? theme->identifier : "", 135 ERR("ipc.prop.set(%s->%s,\"%s\") => %d\n", theme ? theme->identifier : "",
136 key, val, ret); 136 key, val, ret);
137 return ret; 137 return ret;
138#else 138#else
139 return ECORE_CONFIG_ERR_NOTSUPP; 139 return ECORE_CONFIG_ERR_NOTSUPP;
@@ -259,11 +259,11 @@ _ecore_config_ipc_init(const char *pipe_name)
259 memset(list, 0, sizeof(Ecore_Config_Server)); 259 memset(list, 0, sizeof(Ecore_Config_Server));
260 if ((ret = _ecore_config_ipc_ecore_init(pipe_name, &list->server)) != ECORE_CONFIG_ERR_SUCC) 260 if ((ret = _ecore_config_ipc_ecore_init(pipe_name, &list->server)) != ECORE_CONFIG_ERR_SUCC)
261 { 261 {
262 E(2, "_ecore_config_ipc_init: failed to register %s, code %d\n", 262 ERR("_ecore_config_ipc_init: failed to register %s, code %d",
263 pipe_name, ret); 263 pipe_name, ret);
264 } 264 }
265 265
266 E(2, "_ecore_config_ipc_init: registered \"%s\"...\n", pipe_name); 266 ERR("_ecore_config_ipc_init: registered \"%s\"...", pipe_name);
267 267
268 list->name = strdup(pipe_name); 268 list->name = strdup(pipe_name);
269 list->next = __ecore_config_servers; 269 list->next = __ecore_config_servers;
diff --git a/legacy/ecore/src/lib/ecore_config/ecore_config_private.h b/legacy/ecore/src/lib/ecore_config/ecore_config_private.h
index 3beee54a63..233bfcbaad 100644
--- a/legacy/ecore/src/lib/ecore_config/ecore_config_private.h
+++ b/legacy/ecore/src/lib/ecore_config/ecore_config_private.h
@@ -1,15 +1,37 @@
1#ifndef _ECORE_CONFIG_PRIVATE_H 1#ifndef _ECORE_CONFIG_PRIVATE_H
2# define _ECORE_CONFIG_PRIVATE_H 2# define _ECORE_CONFIG_PRIVATE_H
3 3
4 /* eina_log related things */
5
6extern int _ecore_config_log_dom;
7#ifdef ERR
8# undef ERR
9#endif
10#define ERR(...) EINA_LOG_DOM_ERR(_ecore_config_log_dom, __VA_ARGS__)
11
12#ifdef DBG
13# undef DBG
14#endif
15#define DBG(...) EINA_LOG_DOM_DBG(_ecore_config_log_dom, __VA_ARGS__)
16
17#ifdef INF
18# undef INF
19#endif
20#define INF(...) EINA_LOG_DOM_INFO(_ecore_config_log_dom, __VA_ARGS__)
21
22#ifdef WRN
23# undef WRN
24#endif
25#define WRN(...) EINA_LOG_DOM_WARN(_ecore_config_log_dom, __VA_ARGS__)
26
27#ifdef CRIT
28# undef CRIT
29#endif
30#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_config_log_dom, __VA_ARGS__)
31
4/* debug */ 32/* debug */
5extern int DEBUG; 33extern int DEBUG;
6#ifdef __sgi 34
7# define D
8# define E
9#else
10# define D(fmt,args...) do { if(DEBUG>=0) fprintf(stderr,fmt,## args); } while(0);
11# define E(lvl,args...) do { if(DEBUG>=(lvl)) fprintf(stderr,## args); } while(0)
12#endif
13 35
14typedef struct _Ecore_Config_DB_File Ecore_Config_DB_File; 36typedef struct _Ecore_Config_DB_File Ecore_Config_DB_File;
15 37
diff --git a/legacy/ecore/src/lib/ecore_config/ecore_config_storage.c b/legacy/ecore/src/lib/ecore_config/ecore_config_storage.c
index 6a65f6b38e..e2c54dfefe 100644
--- a/legacy/ecore/src/lib/ecore_config/ecore_config_storage.c
+++ b/legacy/ecore/src/lib/ecore_config/ecore_config_storage.c
@@ -84,7 +84,7 @@ ecore_config_file_load(const char *file)
84 db = _ecore_config_db_open_read(file); 84 db = _ecore_config_db_open_read(file);
85 if (!db) 85 if (!db)
86 { 86 {
87 E(0, "Cannot open database from file %s!\n", file); 87 ERR("Cannot open database from file %s!", file);
88 return ECORE_CONFIG_ERR_NODATA; 88 return ECORE_CONFIG_ERR_NODATA;
89 } 89 }
90 key_count = 0; 90 key_count = 0;
@@ -154,7 +154,7 @@ ecore_config_file_save(const char *file)
154 db = _ecore_config_db_open_write(file); 154 db = _ecore_config_db_open_write(file);
155 if (!db) 155 if (!db)
156 { 156 {
157 E(0, "Cannot open database from file %s!\n", file); 157 ERR("Cannot open database from file %s!", file);
158 return ECORE_CONFIG_ERR_FAIL; 158 return ECORE_CONFIG_ERR_FAIL;
159 } 159 }
160 160
diff --git a/legacy/ecore/src/lib/ecore_directfb/ecore_directfb.c b/legacy/ecore/src/lib/ecore_directfb/ecore_directfb.c
index 191be53a8a..515cf5f593 100644
--- a/legacy/ecore/src/lib/ecore_directfb/ecore_directfb.c
+++ b/legacy/ecore/src/lib/ecore_directfb/ecore_directfb.c
@@ -23,7 +23,7 @@
23 * - handle all event types 23 * - handle all event types
24 * - 24 * -
25 * */ 25 * */
26 26int _ecore_directfb_log_dom = -1;
27static int _ecore_directfb_init_count = 0; 27static int _ecore_directfb_init_count = 0;
28 28
29static int _window_event_fd = 0; 29static int _window_event_fd = 0;
@@ -159,7 +159,7 @@ _ecore_directfb_event_handle_key_down(DFBEvent *evt)
159 159
160 if(!k) 160 if(!k)
161 { 161 {
162 printf("error en el numero, %0X\n", evt->input.key_symbol); 162 ERR("error en el numero, %0X", evt->input.key_symbol);
163 return; 163 return;
164 } 164 }
165 e->name = strdup(k->name); 165 e->name = strdup(k->name);
@@ -175,7 +175,7 @@ _ecore_directfb_event_handle_key_down(DFBEvent *evt)
175 175
176 if(!k) 176 if(!k)
177 { 177 {
178 printf("error en el numero, %0X\n", evt->window.key_symbol); 178 ERR("error en el numero, %0X", evt->window.key_symbol);
179 return; 179 return;
180 } 180 }
181 e->name = strdup(k->name); 181 e->name = strdup(k->name);
@@ -208,7 +208,7 @@ _ecore_directfb_event_handle_key_up(DFBEvent *evt)
208 208
209 if(!k) 209 if(!k)
210 { 210 {
211 printf("error en el numero, %0X\n", evt->input.key_symbol); 211 ERR("error en el numero, %0X", evt->input.key_symbol);
212 return; 212 return;
213 } 213 }
214 e->name = strdup(k->name); 214 e->name = strdup(k->name);
@@ -224,7 +224,7 @@ _ecore_directfb_event_handle_key_up(DFBEvent *evt)
224 224
225 if(!k) 225 if(!k)
226 { 226 {
227 printf("error en el numero, %0X\n", evt->window.key_symbol); 227 ERR("error en el numero, %0X", evt->window.key_symbol);
228 return; 228 return;
229 } 229 }
230 e->name = strdup(k->name); 230 e->name = strdup(k->name);
@@ -428,13 +428,13 @@ _ecore_directfb_window_event_fd_handler(void *data __UNUSED__,Ecore_Fd_Handler *
428 if (v < 1) return 1; 428 if (v < 1) return 1;
429 429
430 if(evt.window.type & DWET_POSITION) 430 if(evt.window.type & DWET_POSITION)
431 printf("position\n"); 431 INF("position");
432 if(evt.window.type & DWET_SIZE) 432 if(evt.window.type & DWET_SIZE)
433 printf("size\n"); 433 INF("size");
434 if(evt.window.type & DWET_CLOSE) 434 if(evt.window.type & DWET_CLOSE)
435 printf("close\n"); 435 INF("close");
436 if(evt.window.type & DWET_DESTROYED) 436 if(evt.window.type & DWET_DESTROYED)
437 printf("destroyed\n"); 437 INF("destroyed");
438 if(evt.window.type & DWET_GOTFOCUS) 438 if(evt.window.type & DWET_GOTFOCUS)
439 _ecore_directfb_event_handle_got_focus(&evt.window); 439 _ecore_directfb_event_handle_got_focus(&evt.window);
440 if(evt.window.type & DWET_LOSTFOCUS) 440 if(evt.window.type & DWET_LOSTFOCUS)
@@ -659,7 +659,12 @@ ecore_directfb_init(const char *name __UNUSED__)
659 int i = 0; 659 int i = 0;
660 660
661 if (++_ecore_directfb_init_count != 1) return _ecore_directfb_init_count; 661 if (++_ecore_directfb_init_count != 1) return _ecore_directfb_init_count;
662 662 _ecore_directfb_log_dom = eina_log_domain_register("EcoreDirectFB", ECORE_DEFAULT_LOG_COLOR);
663 if(_ecore_directfb_log_dom < 0)
664 {
665 EINA_LOG_ERR("Impossible to create a log domain for the Ecore directFB module.");
666 return _ecore_directfb_init_count--;
667 }
663 DFBCHECK(DirectFBInit(NULL,NULL)); 668 DFBCHECK(DirectFBInit(NULL,NULL));
664 DFBCHECK(DirectFBCreate(&_dfb)); 669 DFBCHECK(DirectFBCreate(&_dfb));
665 670
@@ -718,6 +723,7 @@ ecore_directfb_shutdown(void)
718 DFBCHECK(_window_event->Release(_window_event)); 723 DFBCHECK(_window_event->Release(_window_event));
719 DFBCHECK(_layer->Release(_layer)); 724 DFBCHECK(_layer->Release(_layer));
720 DFBCHECK(_dfb->Release(_dfb)); 725 DFBCHECK(_dfb->Release(_dfb));
721 726 eina_log_domain_unregister(_ecore_directfb_log_dom);
727 _ecore_directfb_log_dom = -1;
722 return _ecore_directfb_init_count; 728 return _ecore_directfb_init_count;
723} 729}
diff --git a/legacy/ecore/src/lib/ecore_directfb/ecore_directfb_private.h b/legacy/ecore/src/lib/ecore_directfb/ecore_directfb_private.h
index fc9ef5ee40..0977a2fdb0 100644
--- a/legacy/ecore/src/lib/ecore_directfb/ecore_directfb_private.h
+++ b/legacy/ecore/src/lib/ecore_directfb/ecore_directfb_private.h
@@ -1,9 +1,38 @@
1
2/* eina_log related things */
3
4extern int _ecore_directfb_log_dom;
5#ifdef ERR
6# undef ERR
7#endif
8#define ERR(...) EINA_LOG_DOM_ERR(_ecore_directfb_log_dom, __VA_ARGS__)
9
10#ifdef DBG
11# undef DBG
12#endif
13#define DBG(...) EINA_LOG_DOM_DBG(_ecore_directfb_log_dom, __VA_ARGS__)
14
15#ifdef INF
16# undef INF
17#endif
18#define INF(...) EINA_LOG_DOM_INFO(_ecore_directfb_log_dom, __VA_ARGS__)
19
20#ifdef WRN
21# undef WRN
22#endif
23#define WRN(...) EINA_LOG_DOM_WARN(_ecore_directfb_log_dom, __VA_ARGS__)
24
25#ifdef CRIT
26# undef CRIT
27#endif
28#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_directfb_log_dom, __VA_ARGS__)
29
1/* macro for a safe call to DirectFB functions */ 30/* macro for a safe call to DirectFB functions */
2#define DFBCHECK(x...) \ 31#define DFBCHECK(x...) \
3 { \ 32 { \
4 _err = x; \ 33 _err = x; \
5 if (_err != DFB_OK) { \ 34 if (_err != DFB_OK) { \
6 fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \ 35 CRIT("%s <%d>:\n\t", __FILE__, __LINE__ ); \
7 DirectFBErrorFatal( #x, _err ); \ 36 DirectFBErrorFatal( #x, _err ); \
8 } \ 37 } \
9 } 38 }
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas.c
index a04ebb303e..21833971a8 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas.c
@@ -163,10 +163,10 @@ ecore_evas_init(void)
163 if (!ecore_init()) 163 if (!ecore_init())
164 goto shutdown_evas; 164 goto shutdown_evas;
165 165
166 _ecore_evas_log_dom = eina_log_domain_register("Ecore_Evas", ECORE_EVAS_DEFAULT_LOG_COLOR); 166 _ecore_evas_log_dom = eina_log_domain_register("Ecore_Evas", ECORE_DEFAULT_LOG_COLOR);
167 if(_ecore_evas_log_dom < 0) 167 if(_ecore_evas_log_dom < 0)
168 { 168 {
169 EINA_LOG_ERR("Impossible to create a log domain for Ecore_Evas.\n"); 169 EINA_LOG_ERR("Impossible to create a log domain for Ecore_Evas.");
170 goto shutdown_ecore; 170 goto shutdown_ecore;
171 } 171 }
172 172
@@ -220,6 +220,7 @@ ecore_evas_shutdown(void)
220 ecore_main_fd_handler_del(_ecore_evas_async_events_fd); 220 ecore_main_fd_handler_del(_ecore_evas_async_events_fd);
221 221
222 eina_log_domain_unregister(_ecore_evas_log_dom); 222 eina_log_domain_unregister(_ecore_evas_log_dom);
223 _ecore_evas_log_dom = -1;
223 ecore_shutdown(); 224 ecore_shutdown();
224 evas_shutdown(); 225 evas_shutdown();
225 226
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_private.h b/legacy/ecore/src/lib/ecore_evas/ecore_evas_private.h
index 7e0098047b..026fb4cecf 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_private.h
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_private.h
@@ -101,10 +101,6 @@
101 101
102extern int _ecore_evas_log_dom; 102extern int _ecore_evas_log_dom;
103 103
104#ifdef ECORE_EVAS_DEFAULT_LOG_COLOR
105# undef ECORE_EVAS_DEFAULT_LOG_COLOR
106#endif
107#define ECORE_EVAS_DEFAULT_LOG_COLOR EINA_COLOR_CYAN
108#ifdef ERR 104#ifdef ERR
109# undef ERR 105# undef ERR
110#endif 106#endif
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file.c b/legacy/ecore/src/lib/ecore_file/ecore_file.c
index 318d6fff19..b04b35ee6f 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file.c
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file.c
@@ -26,7 +26,7 @@
26 26
27#include "ecore_file_private.h" 27#include "ecore_file_private.h"
28 28
29 29int _ecore_file_log_dom = -1;
30static int _ecore_file_init_count = 0; 30static int _ecore_file_init_count = 0;
31 31
32/* externally accessible functions */ 32/* externally accessible functions */
@@ -41,7 +41,12 @@ ecore_file_init()
41{ 41{
42 if (++_ecore_file_init_count != 1) 42 if (++_ecore_file_init_count != 1)
43 return _ecore_file_init_count; 43 return _ecore_file_init_count;
44 44 _ecore_file_log_dom = eina_log_domain_register("EcoreFile", ECORE_DEFAULT_LOG_COLOR);
45 if(_ecore_file_log_dom < 0)
46 {
47 EINA_LOG_ERR("Impossible to create a log domain for the ecore file module.");
48 return --_ecore_file_init_count;
49 }
45 ecore_file_path_init(); 50 ecore_file_path_init();
46 ecore_file_monitor_init(); 51 ecore_file_monitor_init();
47 ecore_file_download_init(); 52 ecore_file_download_init();
@@ -81,7 +86,8 @@ ecore_file_shutdown()
81 ecore_file_download_shutdown(); 86 ecore_file_download_shutdown();
82 ecore_file_monitor_shutdown(); 87 ecore_file_monitor_shutdown();
83 ecore_file_path_shutdown(); 88 ecore_file_path_shutdown();
84 89 eina_log_domain_unregister(_ecore_file_log_dom);
90 _ecore_file_log_dom = -1;
85 return _ecore_file_init_count; 91 return _ecore_file_init_count;
86} 92}
87 93
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c b/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c
index af68cf7c62..9ae4613015 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c
@@ -274,7 +274,7 @@ _ecore_file_monitor_inotify_monitor(Ecore_File_Monitor *em, const char *path)
274 path, mask); 274 path, mask);
275 if (ECORE_FILE_MONITOR_INOTIFY(em)->wd < 0) 275 if (ECORE_FILE_MONITOR_INOTIFY(em)->wd < 0)
276 { 276 {
277 printf("inotify_add_watch error\n"); 277 ERR("inotify_add_watch error");
278 ecore_file_monitor_inotify_del(em); 278 ecore_file_monitor_inotify_del(em);
279 return 0; 279 return 0;
280 } 280 }
@@ -314,35 +314,35 @@ _ecore_file_monitor_inotify_print(char *file, int mask)
314 314
315 if (mask & IN_MODIFY) 315 if (mask & IN_MODIFY)
316 { 316 {
317 printf("Inotify modified %s: %s\n", type, file); 317 WRN("Inotify modified %s: %s", type, file);
318 } 318 }
319 if (mask & IN_MOVED_FROM) 319 if (mask & IN_MOVED_FROM)
320 { 320 {
321 printf("Inotify moved from %s: %s\n", type, file); 321 WRN("Inotify moved from %s: %s", type, file);
322 } 322 }
323 if (mask & IN_MOVED_TO) 323 if (mask & IN_MOVED_TO)
324 { 324 {
325 printf("Inotify moved to %s: %s\n", type, file); 325 WRN("Inotify moved to %s: %s", type, file);
326 } 326 }
327 if (mask & IN_DELETE) 327 if (mask & IN_DELETE)
328 { 328 {
329 printf("Inotify delete %s: %s\n", type, file); 329 WRN("Inotify delete %s: %s", type, file);
330 } 330 }
331 if (mask & IN_CREATE) 331 if (mask & IN_CREATE)
332 { 332 {
333 printf("Inotify create %s: %s\n", type, file); 333 WRN("Inotify create %s: %s", type, file);
334 } 334 }
335 if (mask & IN_DELETE_SELF) 335 if (mask & IN_DELETE_SELF)
336 { 336 {
337 printf("Inotify delete self %s: %s\n", type, file); 337 WRN("Inotify delete self %s: %s", type, file);
338 } 338 }
339 if (mask & IN_MOVE_SELF) 339 if (mask & IN_MOVE_SELF)
340 { 340 {
341 printf("Inotify move self %s: %s\n", type, file); 341 WRN("Inotify move self %s: %s", type, file);
342 } 342 }
343 if (mask & IN_UNMOUNT) 343 if (mask & IN_UNMOUNT)
344 { 344 {
345 printf("Inotify unmount %s: %s\n", type, file); 345 WRN("Inotify unmount %s: %s", type, file);
346 } 346 }
347} 347}
348#endif 348#endif
diff --git a/legacy/ecore/src/lib/ecore_file/ecore_file_private.h b/legacy/ecore/src/lib/ecore_file/ecore_file_private.h
index 5fe5a2e453..073e446ee4 100644
--- a/legacy/ecore/src/lib/ecore_file/ecore_file_private.h
+++ b/legacy/ecore/src/lib/ecore_file/ecore_file_private.h
@@ -18,6 +18,32 @@
18 18
19#include "Ecore_File.h" 19#include "Ecore_File.h"
20 20
21extern int _ecore_file_log_dom;
22#ifdef ERR
23# undef ERR
24#endif
25#define ERR(...) EINA_LOG_DOM_ERR(_ecore_file_log_dom, __VA_ARGS__)
26
27#ifdef DBG
28# undef DBG
29#endif
30#define DBG(...) EINA_LOG_DOM_DBG(_ecore_file_log_dom, __VA_ARGS__)
31
32#ifdef INF
33# undef INF
34#endif
35#define INF(...) EINA_LOG_DOM_INFO(_ecore_file_log_dom, __VA_ARGS__)
36
37#ifdef WRN
38# undef WRN
39#endif
40#define WRN(...) EINA_LOG_DOM_WARN(_ecore_file_log_dom, __VA_ARGS__)
41
42#ifdef CRIT
43# undef CRIT
44#endif
45#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_file_log_dom, __VA_ARGS__)
46
21/* ecore_file_monitor */ 47/* ecore_file_monitor */
22int ecore_file_monitor_init(void); 48int ecore_file_monitor_init(void);
23void ecore_file_monitor_shutdown(void); 49void ecore_file_monitor_shutdown(void);
diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf.c b/legacy/ecore/src/lib/ecore_imf/ecore_imf.c
index ff5d25157c..f563519212 100644
--- a/legacy/ecore/src/lib/ecore_imf/ecore_imf.c
+++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf.c
@@ -18,6 +18,7 @@ EAPI int ECORE_IMF_EVENT_PREEDIT_CHANGED = 0;
18EAPI int ECORE_IMF_EVENT_COMMIT = 0; 18EAPI int ECORE_IMF_EVENT_COMMIT = 0;
19EAPI int ECORE_IMF_EVENT_DELETE_SURROUNDING = 0; 19EAPI int ECORE_IMF_EVENT_DELETE_SURROUNDING = 0;
20 20
21int _ecore_imf_log_dom = -1;
21static int _ecore_imf_init_count = 0; 22static int _ecore_imf_init_count = 0;
22 23
23/** 24/**
@@ -41,7 +42,13 @@ ecore_imf_init(void)
41 42
42 if (!ecore_init()) 43 if (!ecore_init())
43 return --_ecore_imf_init_count; 44 return --_ecore_imf_init_count;
44 45 _ecore_imf_log_dom = eina_log_domain_register("EcoreIMF", ECORE_DEFAULT_LOG_COLOR);
46 if(_ecore_imf_log_dom < 0)
47 {
48 EINA_LOG_ERR("Impossible to create a log domain for the Ecore IMF module.");
49 ecore_shutdown();
50 return --_ecore_imf_init_count;
51 }
45 ecore_imf_module_init(); 52 ecore_imf_module_init();
46 53
47 ECORE_IMF_EVENT_PREEDIT_START = ecore_event_type_new(); 54 ECORE_IMF_EVENT_PREEDIT_START = ecore_event_type_new();
@@ -67,6 +74,7 @@ ecore_imf_shutdown(void)
67 74
68 ecore_shutdown(); 75 ecore_shutdown();
69 ecore_imf_module_shutdown(); 76 ecore_imf_module_shutdown();
70 77 eina_log_domain_unregister(_ecore_imf_log_dom);
78 _ecore_imf_log_dom = -1;
71 return _ecore_imf_init_count; 79 return _ecore_imf_init_count;
72} 80}
diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c b/legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c
index 9ae303e320..65b998d96f 100644
--- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c
+++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_module.c
@@ -199,26 +199,26 @@ _ecore_imf_module_load_all(void)
199 plugin = ecore_plugin_load(ecore_imf_modules_path, filename, NULL); 199 plugin = ecore_plugin_load(ecore_imf_modules_path, filename, NULL);
200 if (!plugin) 200 if (!plugin)
201 { 201 {
202 fprintf(stderr, "** ecore_imf: Error loading input method plugin %s!\n", 202 ERR("** Error loading input method plugin %s!",
203 filename); 203 filename);
204 continue; 204 continue;
205 } 205 }
206 206
207 imf_module_init = ecore_plugin_symbol_get(plugin, "imf_module_init"); 207 imf_module_init = ecore_plugin_symbol_get(plugin, "imf_module_init");
208 if (!imf_module_init || !imf_module_init(&info) || !info) 208 if (!imf_module_init || !imf_module_init(&info) || !info)
209 { 209 {
210 fprintf(stderr, "** ecore_imf: Error initializing input method plugin %s! " 210 ERR("** Error initializing input method plugin %s! "
211 "'imf_module_init' is missing or failed to run!", 211 "'imf_module_init' is missing or failed to run!",
212 filename); 212 filename);
213 ecore_plugin_unload(plugin); 213 ecore_plugin_unload(plugin);
214 continue; 214 continue;
215 } 215 }
216 216
217 if (_ecore_imf_modules_exists(info->id)) 217 if (_ecore_imf_modules_exists(info->id))
218 { 218 {
219 fprintf(stderr, "** ecore_imf: Error loading input method plugin %s! " 219 ERR("** ecore_imf: Error loading input method plugin %s! "
220 "Plugin with id='%s' already exists!", 220 "Plugin with id='%s' already exists!",
221 filename, info->id); 221 filename, info->id);
222 ecore_plugin_unload(plugin); 222 ecore_plugin_unload(plugin);
223 continue; 223 continue;
224 } 224 }
@@ -226,9 +226,9 @@ _ecore_imf_module_load_all(void)
226 imf_module_create = ecore_plugin_symbol_get(plugin, "imf_module_create"); 226 imf_module_create = ecore_plugin_symbol_get(plugin, "imf_module_create");
227 if (!imf_module_create) 227 if (!imf_module_create)
228 { 228 {
229 fprintf(stderr, "** ecore_imf: Error setting up input method plugin %s! " 229 ERR("** ecore_imf: Error setting up input method plugin %s! "
230 "'imf_module_create' is missing!", 230 "'imf_module_create' is missing!",
231 filename); 231 filename);
232 ecore_plugin_unload(plugin); 232 ecore_plugin_unload(plugin);
233 continue; 233 continue;
234 } 234 }
diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf_private.h b/legacy/ecore/src/lib/ecore_imf/ecore_imf_private.h
index 123757c82f..20e8bf46f6 100644
--- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_private.h
+++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_private.h
@@ -3,6 +3,32 @@
3 3
4#define ECORE_MAGIC_CONTEXT 0x56c1b39a 4#define ECORE_MAGIC_CONTEXT 0x56c1b39a
5 5
6extern int _ecore_imf_log_dom;
7#ifdef ERR
8# undef ERR
9#endif
10#define ERR(...) EINA_LOG_DOM_ERR(_ecore_imf_log_dom, __VA_ARGS__)
11
12#ifdef DBG
13# undef DBG
14#endif
15#define DBG(...) EINA_LOG_DOM_DBG(_ecore_imf_log_dom, __VA_ARGS__)
16
17#ifdef INF
18# undef INF
19#endif
20#define INF(...) EINA_LOG_DOM_INFO(_ecore_imf_log_dom, __VA_ARGS__)
21
22#ifdef WRN
23# undef WRN
24#endif
25#define WRN(...) EINA_LOG_DOM_WARN(_ecore_imf_log_dom, __VA_ARGS__)
26
27#ifdef CRIT
28# undef CRIT
29#endif
30#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_imf_log_dom, __VA_ARGS__)
31
6typedef struct _Ecore_IMF_Module Ecore_IMF_Module; 32typedef struct _Ecore_IMF_Module Ecore_IMF_Module;
7 33
8struct _Ecore_IMF_Context 34struct _Ecore_IMF_Context
diff --git a/legacy/ecore/src/lib/ecore_input/ecore_input.c b/legacy/ecore/src/lib/ecore_input/ecore_input.c
index 3f417854f6..6372ea2717 100644
--- a/legacy/ecore/src/lib/ecore_input/ecore_input.c
+++ b/legacy/ecore/src/lib/ecore_input/ecore_input.c
@@ -15,6 +15,33 @@
15#include "Evas.h" 15#include "Evas.h"
16 16
17 17
18static int _ecore_input_log_dom = -1;
19
20#ifdef ERR
21# undef ERR
22#endif
23#define ERR(...) EINA_LOG_DOM_ERR(_ecore_input_log_dom, __VA_ARGS__)
24
25#ifdef DBG
26# undef DBG
27#endif
28#define DBG(...) EINA_LOG_DOM_DBG(_ecore_input_log_dom, __VA_ARGS__)
29
30#ifdef INF
31# undef INF
32#endif
33#define INF(...) EINA_LOG_DOM_INFO(_ecore_input_log_dom, __VA_ARGS__)
34
35#ifdef WRN
36# undef WRN
37#endif
38#define WRN(...) EINA_LOG_DOM_WARN(_ecore_input_log_dom, __VA_ARGS__)
39
40#ifdef CRIT
41# undef CRIT
42#endif
43#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_input_log_dom, __VA_ARGS__)
44
18typedef struct _Ecore_Input_Window Ecore_Input_Window; 45typedef struct _Ecore_Input_Window Ecore_Input_Window;
19struct _Ecore_Input_Window 46struct _Ecore_Input_Window
20{ 47{
@@ -44,7 +71,12 @@ ecore_event_init(void)
44{ 71{
45 if (++_ecore_event_init_count != 1) 72 if (++_ecore_event_init_count != 1)
46 return _ecore_event_init_count; 73 return _ecore_event_init_count;
47 74 _ecore_input_log_dom = eina_log_domain_register("EcoreInput", ECORE_DEFAULT_LOG_COLOR);
75 if(_ecore_input_log_dom < 0)
76 {
77 EINA_LOG_ERR("Impossible to create a log domain for the ecore input module.");
78 return --_ecore_event_init_count;
79 }
48 ECORE_EVENT_KEY_DOWN = ecore_event_type_new(); 80 ECORE_EVENT_KEY_DOWN = ecore_event_type_new();
49 ECORE_EVENT_KEY_UP = ecore_event_type_new(); 81 ECORE_EVENT_KEY_UP = ecore_event_type_new();
50 ECORE_EVENT_MOUSE_BUTTON_DOWN = ecore_event_type_new(); 82 ECORE_EVENT_MOUSE_BUTTON_DOWN = ecore_event_type_new();
@@ -71,7 +103,8 @@ ecore_event_shutdown(void)
71 ECORE_EVENT_MOUSE_WHEEL = 0; 103 ECORE_EVENT_MOUSE_WHEEL = 0;
72 ECORE_EVENT_MOUSE_IN = 0; 104 ECORE_EVENT_MOUSE_IN = 0;
73 ECORE_EVENT_MOUSE_OUT = 0; 105 ECORE_EVENT_MOUSE_OUT = 0;
74 106 eina_log_domain_unregister(_ecore_input_log_dom);
107 _ecore_input_log_dom = -1;
75 return ++_ecore_event_init_count; 108 return ++_ecore_event_init_count;
76} 109}
77 110
diff --git a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
index f74fedda56..daec531efa 100644
--- a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
+++ b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc.c
@@ -37,6 +37,8 @@
37#define DLT_R1 14 37#define DLT_R1 14
38#define DLT_R2 15 38#define DLT_R2 15
39 39
40int _ecore_ipc_log_dom = -1;
41
40/* byte swappers - for dealing with big vs little endian machines */ 42/* byte swappers - for dealing with big vs little endian machines */
41EAPI unsigned short 43EAPI unsigned short
42_ecore_ipc_swap_16(unsigned short v) 44_ecore_ipc_swap_16(unsigned short v)
@@ -263,7 +265,12 @@ ecore_ipc_init(void)
263 265
264 if (++_ecore_ipc_init_count != 1) 266 if (++_ecore_ipc_init_count != 1)
265 return _ecore_ipc_init_count; 267 return _ecore_ipc_init_count;
266 268 _ecore_ipc_log_dom = eina_log_domain_register("EcoreIpc", ECORE_DEFAULT_LOG_COLOR);
269 if(_ecore_ipc_log_dom < 0)
270 {
271 EINA_LOG_ERR("Impossible to create a log domain for the Ecore IPC module.");
272 return --_ecore_ipc_init_count;
273 }
267 if (!ecore_con_init()) 274 if (!ecore_con_init())
268 return --_ecore_ipc_init_count; 275 return --_ecore_ipc_init_count;
269 276
@@ -309,7 +316,8 @@ ecore_ipc_shutdown(void)
309 ecore_event_handler_del(handler[i]); 316 ecore_event_handler_del(handler[i]);
310 317
311 ecore_con_shutdown(); 318 ecore_con_shutdown();
312 319 eina_log_domain_unregister(_ecore_ipc_log_dom);
320 _ecore_ipc_log_dom = -1;
313 return _ecore_ipc_init_count; 321 return _ecore_ipc_init_count;
314} 322}
315 323
diff --git a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h
index 9595975018..21aedffc0c 100644
--- a/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h
+++ b/legacy/ecore/src/lib/ecore_ipc/ecore_ipc_private.h
@@ -2,6 +2,31 @@
2#define _ECORE_IPC_PRIVATE_H 2#define _ECORE_IPC_PRIVATE_H
3 3
4#include "Ecore_Data.h" 4#include "Ecore_Data.h"
5extern int _ecore_ipc_log_dom;
6#ifdef ERR
7# undef ERR
8#endif
9#define ERR(...) EINA_LOG_DOM_ERR(_ecore_ipc_log_dom, __VA_ARGS__)
10
11#ifdef DBG
12# undef DBG
13#endif
14#define DBG(...) EINA_LOG_DOM_DBG(_ecore_ipc_log_dom, __VA_ARGS__)
15
16#ifdef INF
17# undef INF
18#endif
19#define INF(...) EINA_LOG_DOM_INFO(_ecore_ipc_log_dom, __VA_ARGS__)
20
21#ifdef WRN
22# undef WRN
23#endif
24#define WRN(...) EINA_LOG_DOM_WARN(_ecore_ipc_log_dom, __VA_ARGS__)
25
26#ifdef CRIT
27# undef CRIT
28#endif
29#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_ipc_log_dom, __VA_ARGS__)
5 30
6#if USE_GNUTLS_OPENSSL 31#if USE_GNUTLS_OPENSSL
7# include <gnutls/openssl.h> 32# include <gnutls/openssl.h>
diff --git a/legacy/ecore/src/lib/ecore_job/ecore_job.c b/legacy/ecore/src/lib/ecore_job/ecore_job.c
index 706ee3fd7a..e125be9887 100644
--- a/legacy/ecore/src/lib/ecore_job/ecore_job.c
+++ b/legacy/ecore/src/lib/ecore_job/ecore_job.c
@@ -13,6 +13,7 @@
13#include "ecore_job_private.h" 13#include "ecore_job_private.h"
14#include "Ecore_Job.h" 14#include "Ecore_Job.h"
15 15
16int _ecore_job_log_dom = -1;
16static int _ecore_job_event_handler(void *data, int type, void *ev); 17static int _ecore_job_event_handler(void *data, int type, void *ev);
17static void _ecore_job_event_free(void *data, void *ev); 18static void _ecore_job_event_free(void *data, void *ev);
18 19
@@ -25,7 +26,12 @@ ecore_job_init(void)
25{ 26{
26 if (++_ecore_job_init_count != 1) 27 if (++_ecore_job_init_count != 1)
27 return _ecore_job_init_count; 28 return _ecore_job_init_count;
28 29 _ecore_job_log_dom = eina_log_domain_register("EcoreJob", ECORE_DEFAULT_LOG_COLOR);
30 if(_ecore_job_log_dom < 0)
31 {
32 EINA_LOG_ERR("Impossible to create a log domain for the Ecore Job module.");
33 return _ecore_job_init_count--;
34 }
29 if (!ecore_init()) 35 if (!ecore_init())
30 return --_ecore_job_init_count; 36 return --_ecore_job_init_count;
31 37
@@ -43,8 +49,10 @@ ecore_job_shutdown(void)
43 49
44 ecore_event_handler_del(_ecore_job_handler); 50 ecore_event_handler_del(_ecore_job_handler);
45 _ecore_job_handler = NULL; 51 _ecore_job_handler = NULL;
52 eina_log_domain_unregister(_ecore_job_log_dom);
53 _ecore_job_log_dom = -1;
46 ecore_shutdown(); 54 ecore_shutdown();
47 55
48 return _ecore_job_init_count; 56 return _ecore_job_init_count;
49} 57}
50 58
diff --git a/legacy/ecore/src/lib/ecore_job/ecore_job_private.h b/legacy/ecore/src/lib/ecore_job/ecore_job_private.h
index d5795f2a0a..96d0db81ee 100644
--- a/legacy/ecore/src/lib/ecore_job/ecore_job_private.h
+++ b/legacy/ecore/src/lib/ecore_job/ecore_job_private.h
@@ -3,6 +3,32 @@
3 3
4#define ECORE_MAGIC_JOB 0x76543210 4#define ECORE_MAGIC_JOB 0x76543210
5 5
6extern int _ecore_job_log_dom;
7#ifdef ERR
8# undef ERR
9#endif
10#define ERR(...) EINA_LOG_DOM_ERR(_ecore_job_log_dom, __VA_ARGS__)
11
12#ifdef DBG
13# undef DBG
14#endif
15#define DBG(...) EINA_LOG_DOM_DBG(_ecore_job_log_dom, __VA_ARGS__)
16
17#ifdef INF
18# undef INF
19#endif
20#define INF(...) EINA_LOG_DOM_INFO(_ecore_job_log_dom, __VA_ARGS__)
21
22#ifdef WRN
23# undef WRN
24#endif
25#define WRN(...) EINA_LOG_DOM_WARN(_ecore_job_log_dom, __VA_ARGS__)
26
27#ifdef CRIT
28# undef CRIT
29#endif
30#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_job_log_dom, __VA_ARGS__)
31
6typedef struct _Ecore_Job Ecore_Job; 32typedef struct _Ecore_Job Ecore_Job;
7 33
8struct _Ecore_Job 34struct _Ecore_Job
diff --git a/legacy/ecore/src/lib/ecore_sdl/ecore_sdl.c b/legacy/ecore/src/lib/ecore_sdl/ecore_sdl.c
index 115ed57a56..9c0afcf990 100644
--- a/legacy/ecore/src/lib/ecore_sdl/ecore_sdl.c
+++ b/legacy/ecore/src/lib/ecore_sdl/ecore_sdl.c
@@ -17,6 +17,33 @@
17 17
18#include <eina_rbtree.h> 18#include <eina_rbtree.h>
19 19
20static int _ecore_sdl_log_dom = -1;
21
22#ifdef ERR
23# undef ERR
24#endif
25#define ERR(...) EINA_LOG_DOM_ERR(_ecore_sdl_log_dom, __VA_ARGS__)
26
27#ifdef DBG
28# undef DBG
29#endif
30#define DBG(...) EINA_LOG_DOM_DBG(_ecore_sdl_log_dom, __VA_ARGS__)
31
32#ifdef INF
33# undef INF
34#endif
35#define INF(...) EINA_LOG_DOM_INFO(_ecore_sdl_log_dom, __VA_ARGS__)
36
37#ifdef WRN
38# undef WRN
39#endif
40#define WRN(...) EINA_LOG_DOM_WARN(_ecore_sdl_log_dom, __VA_ARGS__)
41
42#ifdef CRIT
43# undef CRIT
44#endif
45#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_sdl_log_dom, __VA_ARGS__)
46
20typedef struct _Ecore_SDL_Pressed Ecore_SDL_Pressed; 47typedef struct _Ecore_SDL_Pressed Ecore_SDL_Pressed;
21struct _Ecore_SDL_Pressed 48struct _Ecore_SDL_Pressed
22{ 49{
@@ -68,7 +95,12 @@ ecore_sdl_init(const char *name __UNUSED__)
68{ 95{
69 if(++_ecore_sdl_init_count != 1) 96 if(++_ecore_sdl_init_count != 1)
70 return _ecore_sdl_init_count; 97 return _ecore_sdl_init_count;
71 98 _ecore_sdl_log_dom = eina_log_domain_register("EcoreSdl", ECORE_DEFAULT_LOG_COLOR);
99 if(_ecore_sdl_log_dom < 0)
100 {
101 EINA_LOG_ERR("Impossible to create a log domain for the Ecore SDL module.");
102 return --_ecore_sdl_init_count;
103 }
72 if (!ecore_event_init()) 104 if (!ecore_event_init())
73 return --_ecore_sdl_init_count; 105 return --_ecore_sdl_init_count;
74 106
@@ -95,7 +127,8 @@ ecore_sdl_shutdown(void)
95 return _ecore_sdl_init_count; 127 return _ecore_sdl_init_count;
96 128
97 ecore_event_shutdown(); 129 ecore_event_shutdown();
98 130 eina_log_domain_unregister(_ecore_sdl_log_dom);
131 _ecore_sdl_log_dom = -1;
99 return _ecore_sdl_init_count; 132 return _ecore_sdl_init_count;
100} 133}
101 134
diff --git a/legacy/ecore/src/lib/ecore_txt/ecore_txt_private.h b/legacy/ecore/src/lib/ecore_txt/ecore_txt_private.h
index b3e975abec..c6dbb36f42 100644
--- a/legacy/ecore/src/lib/ecore_txt/ecore_txt_private.h
+++ b/legacy/ecore/src/lib/ecore_txt/ecore_txt_private.h
@@ -1,4 +1,30 @@
1#ifndef _ECORE_TXT_PRIVATE_H 1#ifndef _ECORE_TXT_PRIVATE_H
2#define _ECORE_TXT_PRIVATE_H 2#define _ECORE_TXT_PRIVATE_H
3 3
4extern int _ecore_txt_log_dom;
5
6#ifdef ERR
7# undef ERR
8#endif
9#define ERR(...) EINA_LOG_DOM_ERR(_ecore_txt_log_dom, __VA_ARGS__)
10
11#ifdef DBG
12# undef DBG
13#endif
14#define DBG(...) EINA_LOG_DOM_DBG(_ecore_txt_log_dom, __VA_ARGS__)
15
16#ifdef INF
17# undef INF
18#endif
19#define INF(...) EINA_LOG_DOM_INFO(_ecore_txt_log_dom, __VA_ARGS__)
20
21#ifdef WRN
22# undef WRN
23#endif
24#define WRN(...) EINA_LOG_DOM_WARN(_ecore_txt_log_dom, __VA_ARGS__)
25
26#ifdef CRIT
27# undef CRIT
28#endif
29#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_txt_log_dom, __VA_ARGS__)
4#endif 30#endif
diff --git a/legacy/ecore/src/lib/ecore_win32/ecore_win32.c b/legacy/ecore/src/lib/ecore_win32/ecore_win32.c
index a1003db7fb..65b450333c 100644
--- a/legacy/ecore/src/lib/ecore_win32/ecore_win32.c
+++ b/legacy/ecore/src/lib/ecore_win32/ecore_win32.c
@@ -183,6 +183,7 @@ ecore_win32_shutdown()
183 183
184 ecore_event_shutdown(); 184 ecore_event_shutdown();
185 eina_log_domain_unregister(_ecore_win32_log_dom_global); 185 eina_log_domain_unregister(_ecore_win32_log_dom_global);
186 _ecore_win32_log_dom_global = -1;
186 eina_shutdown(); 187 eina_shutdown();
187 188
188 return _ecore_win32_init_count; 189 return _ecore_win32_init_count;
diff --git a/legacy/ecore/src/lib/ecore_wince/ecore_wince.c b/legacy/ecore/src/lib/ecore_wince/ecore_wince.c
index dc5b3d5c70..47a1fd14a8 100644
--- a/legacy/ecore/src/lib/ecore_wince/ecore_wince.c
+++ b/legacy/ecore/src/lib/ecore_wince/ecore_wince.c
@@ -167,6 +167,7 @@ ecore_wince_shutdown()
167 167
168 ecore_event_shutdown(); 168 ecore_event_shutdown();
169 eina_log_domain_unregister(_ecore_wince_log_dom_global); 169 eina_log_domain_unregister(_ecore_wince_log_dom_global);
170 _ecore_wince_log_dom_global = -1;
170 eina_shutdown(); 171 eina_shutdown();
171 172
172 return _ecore_wince_init_count; 173 return _ecore_wince_init_count;
diff --git a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb.c b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb.c
index 0f8c69bd54..d9c9e45844 100644
--- a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb.c
+++ b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb.c
@@ -54,6 +54,7 @@ static xcb_generic_event_t *_ecore_xcb_event_buffered = NULL;
54 54
55static int _ecore_xcb_init_count = 0; 55static int _ecore_xcb_init_count = 0;
56static int _ecore_xcb_grab_count = 0; 56static int _ecore_xcb_grab_count = 0;
57int _ecore_x11xcb_log_dom = -1;
57 58
58Ecore_X_Connection *_ecore_xcb_conn = NULL; 59Ecore_X_Connection *_ecore_xcb_conn = NULL;
59Ecore_X_Screen *_ecore_xcb_screen = NULL; 60Ecore_X_Screen *_ecore_xcb_screen = NULL;
@@ -195,11 +196,18 @@ ecore_x_init(const char *name)
195 196
196 if (--_ecore_xcb_init_count != 1) 197 if (--_ecore_xcb_init_count != 1)
197 return _ecore_xcb_init_count; 198 return _ecore_xcb_init_count;
198 199 _ecore_x11xcb_log_dom = eina_log_domain_register("EcoreXCB", ECORE_DEFAULT_LOG_COLOR);
200 if(_ecore_x11xcb_log_dom < 0)
201 {
202 EINA_LOG_ERR("Impossible to create a log domain the Ecore XCB module.");
203 return --_ecore_xcb_init_count;
204 }
199 _ecore_xcb_conn = xcb_connect(name, &screen); 205 _ecore_xcb_conn = xcb_connect(name, &screen);
200 if (!_ecore_xcb_conn) 206 if (!_ecore_xcb_conn) {
207 eina_log_domain_unregister(_ecore_x11xcb_log_dom);
208 _ecore_x11xcb_log_dom = -1;
201 return --_ecore_xcb_init_count; 209 return --_ecore_xcb_init_count;
202 210 }
203 /* FIXME: no error code right now */ 211 /* FIXME: no error code right now */
204 /* _ecore_xcb_error_handler_init(); */ 212 /* _ecore_xcb_error_handler_init(); */
205 213
@@ -909,7 +917,7 @@ _ecore_xcb_fd_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
909 917
910 c = (xcb_connection_t *)data; 918 c = (xcb_connection_t *)data;
911 919
912/* printf ("nbr events: %d\n", _ecore_xcb_event_handlers_num); */ 920/* INF ("nbr events: %d", _ecore_xcb_event_handlers_num); */
913 921
914 /* We check if _ecore_xcb_event_buffered is NULL or not */ 922 /* We check if _ecore_xcb_event_buffered is NULL or not */
915 if (_ecore_xcb_event_buffered) 923 if (_ecore_xcb_event_buffered)
diff --git a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_events.c b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_events.c
index da8a14aab7..8aac26acf4 100644
--- a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_events.c
+++ b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_events.c
@@ -1592,7 +1592,7 @@ _ecore_x_event_handle_client_message(xcb_generic_event_t *event)
1592 target->version = ev->data.data32[1] >> 24; 1592 target->version = ev->data.data32[1] >> 24;
1593 if (target->version > ECORE_X_DND_VERSION) 1593 if (target->version > ECORE_X_DND_VERSION)
1594 { 1594 {
1595 printf("DND: Requested version %d, we only support up to %d\n", target->version, 1595 WRN("DND: Requested version %d, we only support up to %d", target->version,
1596 ECORE_X_DND_VERSION); 1596 ECORE_X_DND_VERSION);
1597 return; 1597 return;
1598 } 1598 }
@@ -1619,7 +1619,7 @@ _ecore_x_event_handle_client_message(xcb_generic_event_t *event)
1619 &num_ret); 1619 &num_ret);
1620 if (!format) 1620 if (!format)
1621 { 1621 {
1622 printf("DND: Could not fetch data type list from source window, aborting.\n"); 1622 ERR("DND: Could not fetch data type list from source window, aborting.");
1623 return; 1623 return;
1624 } 1624 }
1625 types = (Ecore_X_Atom *)data; 1625 types = (Ecore_X_Atom *)data;
@@ -1882,7 +1882,7 @@ _ecore_x_event_handle_client_message(xcb_generic_event_t *event)
1882 xcb_get_atom_name_name(reply), 1882 xcb_get_atom_name_name(reply),
1883 reply->name_len); 1883 reply->name_len);
1884 name[reply->name_len] = '\0'; 1884 name[reply->name_len] = '\0';
1885 printf("Unknown state: %s\n", name); 1885 ERR("Unknown state: %s", name);
1886 free(name); 1886 free(name);
1887 free(reply); 1887 free(reply);
1888 } 1888 }
@@ -1903,7 +1903,7 @@ _ecore_x_event_handle_client_message(xcb_generic_event_t *event)
1903 xcb_get_atom_name_name(reply), 1903 xcb_get_atom_name_name(reply),
1904 reply->name_len); 1904 reply->name_len);
1905 name[reply->name_len] = '\0'; 1905 name[reply->name_len] = '\0';
1906 printf("Unknown state: %s\n", name); 1906 WRN("Unknown state: %s", name);
1907 free(name); 1907 free(name);
1908 } 1908 }
1909 } 1909 }
@@ -2107,7 +2107,7 @@ _ecore_x_event_handle_randr_change(xcb_generic_event_t *event)
2107 2107
2108 if ((!rep) || 2108 if ((!rep) ||
2109 (((ev->response_type & ~0x80) - rep->first_event) != XCB_RANDR_SCREEN_CHANGE_NOTIFY)) 2109 (((ev->response_type & ~0x80) - rep->first_event) != XCB_RANDR_SCREEN_CHANGE_NOTIFY))
2110 printf("ERROR: Can't update RandR config!\n"); 2110 WRN("ERROR: Can't update RandR config!");
2111 if (rep) 2111 if (rep)
2112 free(rep); 2112 free(rep);
2113 } 2113 }
diff --git a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c
index 2f4b6b75b7..937c62915a 100644
--- a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c
+++ b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_icccm.c
@@ -1450,7 +1450,7 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window window __UNUSED__)
1450 reply = _ecore_xcb_reply_get(); 1450 reply = _ecore_xcb_reply_get();
1451 if (!reply) return NULL; 1451 if (!reply) return NULL;
1452 1452
1453 printf ("[XCB] reply->bytes_afer (should be 0): %d\n", ((xcb_get_property_reply_t *)reply)->bytes_after); 1453 ERR("reply->bytes_afer (should be 0): %d", ((xcb_get_property_reply_t *)reply)->bytes_after);
1454 1454
1455 if (reply->type == ECORE_X_ATOM_UTF8_STRING) 1455 if (reply->type == ECORE_X_ATOM_UTF8_STRING)
1456 { 1456 {
diff --git a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c
index cc8bbfa430..5d12969fb4 100644
--- a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c
+++ b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_netwm.c
@@ -2776,7 +2776,7 @@ _ecore_x_netwm_startup_info_begin(Ecore_X_Window window,
2776 if (info) 2776 if (info)
2777 { 2777 {
2778 exists = 1; 2778 exists = 1;
2779 printf("Already got info for win: 0x%x\n", window); 2779 INF("Already got info for win: 0x%x", window);
2780 _ecore_x_netwm_startup_info_free(info); 2780 _ecore_x_netwm_startup_info_free(info);
2781 } 2781 }
2782 info = calloc(1, sizeof(Ecore_X_Startup_Info)); 2782 info = calloc(1, sizeof(Ecore_X_Startup_Info));
@@ -3128,7 +3128,7 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info,
3128 } 3128 }
3129 else 3129 else
3130 { 3130 {
3131 printf("Ecore X Sequence, Unknown: %s=%s\n", key, value); 3131 WRN("Ecore X Sequence, Unknown: %s=%s", key, value);
3132 } 3132 }
3133 } 3133 }
3134 if (!info->id) return 0; 3134 if (!info->id) return 0;
diff --git a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_private.h b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_private.h
index b60cf188ba..172b5da610 100644
--- a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_private.h
+++ b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_private.h
@@ -60,6 +60,33 @@
60/* FIXME: this is for simulation only */ 60/* FIXME: this is for simulation only */
61#include "Ecore_Txt.h" 61#include "Ecore_Txt.h"
62 62
63static int _ecore_x11xcb_log_dom -1;
64
65#ifdef ERR
66# undef ERR
67#endif
68#define ERR(...) EINA_LOG_DOM_ERR(_ecore_x11xcb_log_dom, __VA_ARGS__)
69
70#ifdef DBG
71# undef DBG
72#endif
73#define DBG(...) EINA_LOG_DOM_DBG(_ecore_x11xcb_log_dom, __VA_ARGS__)
74
75#ifdef INF
76# undef INF
77#endif
78#define INF(...) EINA_LOG_DOM_INFO(_ecore_x11xcb_log_dom, __VA_ARGS__)
79
80#ifdef WRN
81# undef WRN
82#endif
83#define WRN(...) EINA_LOG_DOM_WARN(_ecore_x11xcb_log_dom, __VA_ARGS__)
84
85#ifdef CRIT
86# undef CRIT
87#endif
88#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_x11xcb_log_dom, __VA_ARGS__)
89
63typedef struct _Ecore_X_Selection_Intern Ecore_X_Selection_Intern; 90typedef struct _Ecore_X_Selection_Intern Ecore_X_Selection_Intern;
64 91
65struct _Ecore_X_Selection_Intern 92struct _Ecore_X_Selection_Intern
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c
index a653d14eb6..df42d61518 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x.c
@@ -31,6 +31,7 @@ static const int AnyXEvent = 0; /* 0 can be used as there are no event types
31static int _ecore_x_event_shape_id = 0; 31static int _ecore_x_event_shape_id = 0;
32static int _ecore_x_event_screensaver_id = 0; 32static int _ecore_x_event_screensaver_id = 0;
33static int _ecore_x_event_sync_id = 0; 33static int _ecore_x_event_sync_id = 0;
34int _ecore_xlib_log_dom = -1;
34 35
35#ifdef ECORE_XRANDR 36#ifdef ECORE_XRANDR
36static int _ecore_x_event_randr_id = 0; 37static int _ecore_x_event_randr_id = 0;
@@ -168,10 +169,18 @@ ecore_x_init(const char *name)
168 169
169 if (++_ecore_x_init_count != 1) 170 if (++_ecore_x_init_count != 1)
170 return _ecore_x_init_count; 171 return _ecore_x_init_count;
171 172 _ecore_xlib_log_dom = eina_log_domain_register("EcoreX11", ECORE_DEFAULT_LOG_COLOR);
173 if(_ecore_xlib_log_dom < 0)
174 {
175 EINA_LOG_ERR("Impossible to create a log domain for the Ecore Xlib module.");
176 return --_ecore_x_init_count;
177 }
172 if (!ecore_event_init()) 178 if (!ecore_event_init())
173 return --_ecore_x_init_count; 179 {
174 180 eina_log_domain_unregister(_ecore_xlib_log_dom);
181 _ecore_xlib_log_dom = -1;
182 return --_ecore_x_init_count;
183 }
175 _ecore_x_disp = XOpenDisplay((char *)name); 184 _ecore_x_disp = XOpenDisplay((char *)name);
176 if (!_ecore_x_disp) 185 if (!_ecore_x_disp)
177 goto shutdown_ecore_event; 186 goto shutdown_ecore_event;
@@ -508,7 +517,8 @@ _ecore_x_shutdown(int close_display)
508 _ecore_x_dnd_shutdown(); 517 _ecore_x_dnd_shutdown();
509 ecore_x_netwm_shutdown(); 518 ecore_x_netwm_shutdown();
510 ecore_event_shutdown(); 519 ecore_event_shutdown();
511 520 eina_log_domain_unregister(_ecore_xlib_log_dom);
521 _ecore_xlib_log_dom = -1;
512 return _ecore_x_init_count; 522 return _ecore_x_init_count;
513} 523}
514 524
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c
index 49eccc72c7..86737fedcb 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_events.c
@@ -1421,7 +1421,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
1421 target->version = (int) (xevent->xclient.data.l[1] >> 24); 1421 target->version = (int) (xevent->xclient.data.l[1] >> 24);
1422 if (target->version > ECORE_X_DND_VERSION) 1422 if (target->version > ECORE_X_DND_VERSION)
1423 { 1423 {
1424 printf("DND: Requested version %d, we only support up to %d\n", 1424 WRN("DND: Requested version %d, we only support up to %d",
1425 target->version, ECORE_X_DND_VERSION); 1425 target->version, ECORE_X_DND_VERSION);
1426 return; 1426 return;
1427 } 1427 }
@@ -1438,7 +1438,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
1438 XA_ATOM, 1438 XA_ATOM,
1439 32, &data, &num_ret))) 1439 32, &data, &num_ret)))
1440 { 1440 {
1441 printf("DND: Could not fetch data type list from source window, aborting.\n"); 1441 WRN("DND: Could not fetch data type list from source window, aborting.");
1442 return; 1442 return;
1443 } 1443 }
1444 types = (Ecore_X_Atom *)data; 1444 types = (Ecore_X_Atom *)data;
@@ -1654,7 +1654,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
1654 char *name; 1654 char *name;
1655 1655
1656 name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[1]); 1656 name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[1]);
1657 if (name) printf("Unknown state: %s\n", name); 1657 if (name) ERR("Unknown state: %s", name);
1658 XFree(name); 1658 XFree(name);
1659 } 1659 }
1660 e->state[1] = _ecore_x_netwm_state_get(xevent->xclient.data.l[2]); 1660 e->state[1] = _ecore_x_netwm_state_get(xevent->xclient.data.l[2]);
@@ -1663,7 +1663,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
1663 char *name; 1663 char *name;
1664 1664
1665 name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[2]); 1665 name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[2]);
1666 if (name) printf("Unknown state: %s\n", name); 1666 if (name) ERR("Unknown state: %s", name);
1667 XFree(name); 1667 XFree(name);
1668 } 1668 }
1669 e->source = xevent->xclient.data.l[3]; 1669 e->source = xevent->xclient.data.l[3];
@@ -1844,7 +1844,7 @@ _ecore_x_event_handle_randr_change(XEvent *xevent)
1844 _ecore_x_last_event_mouse_move = 0; 1844 _ecore_x_last_event_mouse_move = 0;
1845 randr_event = (XRRScreenChangeNotifyEvent *)xevent; 1845 randr_event = (XRRScreenChangeNotifyEvent *)xevent;
1846 if (!XRRUpdateConfiguration(xevent)) 1846 if (!XRRUpdateConfiguration(xevent))
1847 printf("ERROR: Can't update RR config!\n"); 1847 ERR("Can't update RR config!");
1848 1848
1849 e = calloc(1, sizeof(Ecore_X_Event_Screen_Change)); 1849 e = calloc(1, sizeof(Ecore_X_Event_Screen_Change));
1850 if (!e) return; 1850 if (!e) return;
@@ -1937,8 +1937,8 @@ _ecore_x_event_handle_randr_notify(XEvent *xevent)
1937 _ecore_x_event_handle_randr_notify_output_property(randr_event); 1937 _ecore_x_event_handle_randr_notify_output_property(randr_event);
1938 break; 1938 break;
1939 default: 1939 default:
1940 fprintf(stderr, "ERROR: unknown XRandR RRNotify subtype: %d.\n", 1940 ERR("Unknown XRandR RRNotify subtype: %d.",
1941 randr_event->subtype); 1941 randr_event->subtype);
1942 break; 1942 break;
1943 } 1943 }
1944} 1944}
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c
index 277566f5b5..7551101603 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_netwm.c
@@ -1154,7 +1154,7 @@ _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__, char *data __UN
1154 if (info) 1154 if (info)
1155 { 1155 {
1156 exists = 1; 1156 exists = 1;
1157 printf("Already got info for win: 0x%x\n", win); 1157 WRN("Already got info for win: 0x%x", win);
1158 _ecore_x_netwm_startup_info_free(info); 1158 _ecore_x_netwm_startup_info_free(info);
1159 } 1159 }
1160 info = calloc(1, sizeof(Ecore_X_Startup_Info)); 1160 info = calloc(1, sizeof(Ecore_X_Startup_Info));
@@ -1478,7 +1478,7 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data)
1478 } 1478 }
1479 else 1479 else
1480 { 1480 {
1481 printf("Ecore X Sequence, Unknown: %s=%s\n", key, value); 1481 ERR("Ecore X Sequence, Unknown: %s=%s", key, value);
1482 } 1482 }
1483 } 1483 }
1484 if (!info->id) return 0; 1484 if (!info->id) return 0;
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_private.h b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_private.h
index 3d74bdd90e..6bca51138f 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_private.h
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_private.h
@@ -57,6 +57,33 @@
57/* FIXME: this is for simulation only */ 57/* FIXME: this is for simulation only */
58#include "Ecore_Txt.h" 58#include "Ecore_Txt.h"
59 59
60extern int _ecore_xlib_log_dom;
61
62#ifdef ERR
63# undef ERR
64#endif
65#define ERR(...) EINA_LOG_DOM_ERR(_ecore_xlib_log_dom, __VA_ARGS__)
66
67#ifdef DBG
68# undef DBG
69#endif
70#define DBG(...) EINA_LOG_DOM_DBG(_ecore_xlib_log_dom, __VA_ARGS__)
71
72#ifdef INF
73# undef INF
74#endif
75#define INF(...) EINA_LOG_DOM_INFO(_ecore_xlib_log_dom, __VA_ARGS__)
76
77#ifdef WRN
78# undef WRN
79#endif
80#define WRN(...) EINA_LOG_DOM_WARN(_ecore_xlib_log_dom, __VA_ARGS__)
81
82#ifdef CRIT
83# undef CRIT
84#endif
85#define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_xlib_log_dom, __VA_ARGS__)
86
60typedef struct _Ecore_X_Selection_Intern Ecore_X_Selection_Intern; 87typedef struct _Ecore_X_Selection_Intern Ecore_X_Selection_Intern;
61 88
62struct _Ecore_X_Selection_Intern 89struct _Ecore_X_Selection_Intern
diff --git a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr.c b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr.c
index 5cba091c79..a873cd24d1 100644
--- a/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr.c
+++ b/legacy/ecore/src/lib/ecore_x/xlib/ecore_x_randr.c
@@ -152,7 +152,7 @@ ecore_x_randr_current_screen_size_get(Ecore_X_Window root)
152 sc = XRRGetScreenInfo(_ecore_x_disp, root); 152 sc = XRRGetScreenInfo(_ecore_x_disp, root);
153 if (!sc) 153 if (!sc)
154 { 154 {
155 printf("ERROR: Couldn't get screen information for %d\n", root); 155 ERR("Couldn't get screen information for %d", root);
156 return ret; 156 return ret;
157 } 157 }
158 size_index = XRRConfigCurrentConfiguration(sc, &rotation); 158 size_index = XRRConfigCurrentConfiguration(sc, &rotation);
@@ -192,7 +192,7 @@ ecore_x_randr_screen_size_set(Ecore_X_Window root, Ecore_X_Screen_Size size)
192 root, size_index, 192 root, size_index,
193 RR_Rotate_0, CurrentTime)) 193 RR_Rotate_0, CurrentTime))
194 { 194 {
195 printf("ERROR: Can't set new screen size!\n"); 195 ERR("Can't set new screen size!");
196 XRRFreeScreenConfigInfo(sc); 196 XRRFreeScreenConfigInfo(sc);
197 return 0; 197 return 0;
198 } 198 }
@@ -213,7 +213,7 @@ ecore_x_randr_current_screen_refresh_rate_get(Ecore_X_Window root)
213 sc = XRRGetScreenInfo(_ecore_x_disp, root); 213 sc = XRRGetScreenInfo(_ecore_x_disp, root);
214 if (!sc) 214 if (!sc)
215 { 215 {
216 printf("ERROR: Couldn't get screen information for %d\n", root); 216 ERR("Couldn't get screen information for %d", root);
217 return ret; 217 return ret;
218 } 218 }
219 ret.rate = XRRConfigCurrentRate(sc); 219 ret.rate = XRRConfigCurrentRate(sc);
@@ -236,7 +236,7 @@ ecore_x_randr_screen_refresh_rates_get(Ecore_X_Window root, int size_id, int *nu
236 sc = XRRGetScreenInfo(_ecore_x_disp, root); 236 sc = XRRGetScreenInfo(_ecore_x_disp, root);
237 if (!sc) 237 if (!sc)
238 { 238 {
239 printf("ERROR: Couldn't get screen information for %d\n", root); 239 ERR("Couldn't get screen information for %d", root);
240 return ret; 240 return ret;
241 } 241 }
242 242
@@ -285,7 +285,7 @@ ecore_x_randr_screen_refresh_rate_set(Ecore_X_Window root, Ecore_X_Screen_Size s
285 root, size_index, 285 root, size_index,
286 RR_Rotate_0, rate.rate, CurrentTime)) 286 RR_Rotate_0, rate.rate, CurrentTime))
287 { 287 {
288 printf("ERROR: Can't set new screen size and refresh rate!\n"); 288 ERR("Can't set new screen size and refresh rate!");
289 XRRFreeScreenConfigInfo(sc); 289 XRRFreeScreenConfigInfo(sc);
290 return 0; 290 return 0;
291 } 291 }