Title: [128962] trunk/Source/WebKit2
Revision
128962
Author
[email protected]
Date
2012-09-18 20:33:36 -0700 (Tue, 18 Sep 2012)

Log Message

[EFL][WK2] Add log macros for EINA_LOG_DOM_XXX series
https://bugs.webkit.org/show_bug.cgi?id=97061

Patch by Jinwoo Song <[email protected]> on 2012-09-18
Reviewed by Gyuyoung Kim.

EFL Webkit2 is using the EINA_LOG_DOM_XXX series in several places to log a message on the specified domain and format.
This patch adds log macros to simplify these logging codes.

* UIProcess/API/efl/ewk_main.cpp:
(ewk_init):
* UIProcess/API/efl/ewk_private.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_webprocess_crashed):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (128961 => 128962)


--- trunk/Source/WebKit2/ChangeLog	2012-09-19 03:08:37 UTC (rev 128961)
+++ trunk/Source/WebKit2/ChangeLog	2012-09-19 03:33:36 UTC (rev 128962)
@@ -1,3 +1,19 @@
+2012-09-18  Jinwoo Song  <[email protected]>
+
+        [EFL][WK2] Add log macros for EINA_LOG_DOM_XXX series
+        https://bugs.webkit.org/show_bug.cgi?id=97061
+
+        Reviewed by Gyuyoung Kim.
+
+        EFL Webkit2 is using the EINA_LOG_DOM_XXX series in several places to log a message on the specified domain and format.
+        This patch adds log macros to simplify these logging codes.
+
+        * UIProcess/API/efl/ewk_main.cpp:
+        (ewk_init):
+        * UIProcess/API/efl/ewk_private.h:
+        * UIProcess/API/efl/ewk_view.cpp:
+        (ewk_view_webprocess_crashed):
+
 2012-09-17  Martin Robinson  <[email protected]>
 
         [WebKit2] [GTK] Add API for controlling the user agent

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_main.cpp (128961 => 128962)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_main.cpp	2012-09-19 03:08:37 UTC (rev 128961)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_main.cpp	2012-09-19 03:33:36 UTC (rev 128962)
@@ -22,6 +22,7 @@
 #include "config.h"
 #include "ewk_main.h"
 
+#include "ewk_private.h"
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Edje.h>
@@ -53,24 +54,24 @@
     }
 
     if (!evas_init()) {
-        EINA_LOG_DOM_CRIT(_ewk_log_dom, "could not init evas.");
+        CRITICAL("could not init evas.");
         goto error_evas;
     }
 
     if (!ecore_init()) {
-        EINA_LOG_DOM_CRIT(_ewk_log_dom, "could not init ecore.");
+        CRITICAL("could not init ecore.");
         goto error_ecore;
     }
 
     if (!ecore_evas_init()) {
-        EINA_LOG_DOM_CRIT(_ewk_log_dom, "could not init ecore_evas.");
+        CRITICAL("could not init ecore_evas.");
         goto error_ecore_evas;
     }
 
     g_type_init();
 
     if (!ecore_main_loop_glib_integrate()) {
-        EINA_LOG_DOM_WARN(_ewk_log_dom, "Ecore was not compiled with GLib support, some plugins will not "
+        WRN("Ecore was not compiled with GLib support, some plugins will not "
             "work (ie: Adobe Flash)");
     }
 

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_private.h (128961 => 128962)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_private.h	2012-09-19 03:08:37 UTC (rev 128961)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_private.h	2012-09-19 03:33:36 UTC (rev 128962)
@@ -33,4 +33,10 @@
 
 extern int _ewk_log_dom;
 
+#define CRITICAL(...) EINA_LOG_DOM_CRIT(_ewk_log_dom, __VA_ARGS__)
+#define ERR(...) EINA_LOG_DOM_ERR(_ewk_log_dom, __VA_ARGS__)
+#define WRN(...) EINA_LOG_DOM_WARN(_ewk_log_dom, __VA_ARGS__)
+#define INF(...) EINA_LOG_DOM_INFO(_ewk_log_dom, __VA_ARGS__)
+#define DBG(...) EINA_LOG_DOM_DBG(_ewk_log_dom, __VA_ARGS__)
+
 #endif // ewk_private_h

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp (128961 => 128962)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp	2012-09-19 03:08:37 UTC (rev 128961)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp	2012-09-19 03:33:36 UTC (rev 128962)
@@ -1643,7 +1643,7 @@
 
     if (!handled) {
         CString url = ""
-        EINA_LOG_DOM_WARN(_ewk_log_dom, "WARNING: The web process experienced a crash on '%s'.\n", url.data());
+        WRN("WARNING: The web process experienced a crash on '%s'.\n", url.data());
 
         // Display an error page
         ewk_view_html_string_load(ewkView, "The web process has crashed.", 0, url.data());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to