summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-09-03 23:19:11 +0100
committerVincent Sanders <vince@kyllikki.org>2017-09-06 18:45:35 +0100
commit63f5ba6f62eb3f506d06d16f29e18c49338a1128 (patch)
tree7e4d91fd664fb572aff1d64093a93c1bb38fdd6f /content
parent9e81082355a54daf468589f5c4f351d869ec5a21 (diff)
downloadnetsurf-63f5ba6f62eb3f506d06d16f29e18c49338a1128.tar.gz
netsurf-63f5ba6f62eb3f506d06d16f29e18c49338a1128.tar.bz2
update bindings with logging changes
Diffstat (limited to 'content')
-rw-r--r--content/handlers/javascript/duktape/Console.bnd2
-rw-r--r--content/handlers/javascript/duktape/Document.bnd19
-rw-r--r--content/handlers/javascript/duktape/Element.bnd2
-rw-r--r--content/handlers/javascript/duktape/EventTarget.bnd3
-rw-r--r--content/handlers/javascript/duktape/Location.bnd8
-rw-r--r--content/handlers/javascript/duktape/Window.bnd7
6 files changed, 23 insertions, 18 deletions
diff --git a/content/handlers/javascript/duktape/Console.bnd b/content/handlers/javascript/duktape/Console.bnd
index 7b4de1ee3..c4c0c8399 100644
--- a/content/handlers/javascript/duktape/Console.bnd
+++ b/content/handlers/javascript/duktape/Console.bnd
@@ -34,7 +34,7 @@ write_log_entry(duk_context *ctx, unsigned int group, char logtype)
/* spcs... pfx strs... */
duk_concat(ctx, duk_get_top(ctx));
/* str */
- LOG("%s", duk_safe_to_string(ctx, 0));
+ NSLOG(netsurf, INFO, "%s", duk_safe_to_string(ctx, 0));
}
%};
diff --git a/content/handlers/javascript/duktape/Document.bnd b/content/handlers/javascript/duktape/Document.bnd
index 8658aec45..ece417d0d 100644
--- a/content/handlers/javascript/duktape/Document.bnd
+++ b/content/handlers/javascript/duktape/Document.bnd
@@ -41,11 +41,12 @@ method Document::write()
corestring_dom___ns_key_html_content_data,
&htmlc);
if ((err != DOM_NO_ERR) || (htmlc == NULL)) {
- LOG("error getting htmlc. parent node:%p htmlc:%p",
- priv->parent.node, htmlc);
+ NSLOG(netsurf, INFO,
+ "error getting htmlc. parent node:%p htmlc:%p",
+ priv->parent.node, htmlc);
return 0;
} else if (htmlc->parser == NULL) {
- LOG("error; no parser for htmlc: %p", htmlc);
+ NSLOG(netsurf, INFO, "error; no parser for htmlc: %p", htmlc);
return 0;
}
@@ -74,11 +75,12 @@ method Document::writeln()
corestring_dom___ns_key_html_content_data,
&htmlc);
if ((err != DOM_NO_ERR) || (htmlc == NULL)) {
- LOG("error getting htmlc. parent node:%p htmlc:%p",
- priv->parent.node, htmlc);
+ NSLOG(netsurf, INFO,
+ "error getting htmlc. parent node:%p htmlc:%p",
+ priv->parent.node, htmlc);
return 0;
} else if (htmlc->parser == NULL) {
- LOG("error; no parser for htmlc: %p", htmlc);
+ NSLOG(netsurf, INFO, "error; no parser for htmlc: %p", htmlc);
return 0;
}
@@ -311,8 +313,9 @@ getter Document::cookie()
return 1;
}
} else {
- LOG("error getting htmlc. parent node:%p htmlc:%p",
- priv->parent.node, htmlc);
+ NSLOG(netsurf, INFO,
+ "error getting htmlc. parent node:%p htmlc:%p",
+ priv->parent.node, htmlc);
}
return 0;
%}
diff --git a/content/handlers/javascript/duktape/Element.bnd b/content/handlers/javascript/duktape/Element.bnd
index d34e8c1eb..f7e33545f 100644
--- a/content/handlers/javascript/duktape/Element.bnd
+++ b/content/handlers/javascript/duktape/Element.bnd
@@ -183,7 +183,7 @@ getter Element::childElementCount()
element = NULL;
}
}
- LOG("I found %u of them", jsret);
+ NSLOG(netsurf, INFO, "I found %u of them", jsret);
duk_push_uint(ctx, jsret);
return 1;
%}
diff --git a/content/handlers/javascript/duktape/EventTarget.bnd b/content/handlers/javascript/duktape/EventTarget.bnd
index 92e2ac83e..d1f9e50d7 100644
--- a/content/handlers/javascript/duktape/EventTarget.bnd
+++ b/content/handlers/javascript/duktape/EventTarget.bnd
@@ -173,7 +173,8 @@ method EventTarget::addEventListener()
exc = dom_string_create((const uint8_t*)ev_ty, ev_ty_l,
&ev_ty_s);
if (exc != DOM_NO_ERR) {
- LOG("Oh dear, failed to create dom_string in addEventListener()");
+ NSLOG(netsurf, INFO,
+ "Oh dear, failed to create dom_string in addEventListener()");
return 0;
}
dukky_register_event_listener_for(
diff --git a/content/handlers/javascript/duktape/Location.bnd b/content/handlers/javascript/duktape/Location.bnd
index ca7e90509..a731730de 100644
--- a/content/handlers/javascript/duktape/Location.bnd
+++ b/content/handlers/javascript/duktape/Location.bnd
@@ -40,7 +40,7 @@ method Location::reload()
if (priv_win->win != NULL) {
browser_window_reload(priv_win->win, false);
} else {
- LOG("failed to get browser context");
+ NSLOG(netsurf, INFO, "failed to get browser context");
}
return 0;
%}
@@ -54,7 +54,7 @@ method Location::assign()
duk_pop(ctx);
if (priv_win == NULL || priv_win->win == NULL) {
- LOG("failed to get browser context");
+ NSLOG(netsurf, INFO, "failed to get browser context");
return 0;
}
@@ -83,7 +83,7 @@ method Location::replace()
duk_pop(ctx);
if (priv_win == NULL || priv_win->win == NULL) {
- LOG("failed to get browser context");
+ NSLOG(netsurf, INFO, "failed to get browser context");
return 0;
}
@@ -131,7 +131,7 @@ setter Location::href()
duk_pop(ctx);
if (priv_win == NULL || priv_win->win == NULL) {
- LOG("failed to get browser context");
+ NSLOG(netsurf, INFO, "failed to get browser context");
return 0;
}
diff --git a/content/handlers/javascript/duktape/Window.bnd b/content/handlers/javascript/duktape/Window.bnd
index 4af8c7aa9..3f680d47d 100644
--- a/content/handlers/javascript/duktape/Window.bnd
+++ b/content/handlers/javascript/duktape/Window.bnd
@@ -25,9 +25,10 @@ init Window(struct browser_window *win, struct html_content *htmlc)
/* element window */
priv->win = win;
priv->htmlc = htmlc;
- LOG("win=%p htmlc=%p", priv->win, priv->htmlc);
+ NSLOG(netsurf, INFO, "win=%p htmlc=%p", priv->win, priv->htmlc);
- LOG("URL is %s", nsurl_access(browser_window_get_url(priv->win)));
+ NSLOG(netsurf, INFO,
+ "URL is %s", nsurl_access(browser_window_get_url(priv->win)));
%}
prototype Window()
@@ -138,6 +139,6 @@ method Window::alert()
%{
duk_size_t msg_len;
const char *msg = duk_safe_to_lstring(ctx, 0, &msg_len);
- LOG("JS ALERT: %*s", (int)msg_len, msg);
+ NSLOG(netsurf, INFO, "JS ALERT: %*s", (int)msg_len, msg);
return 0;
%}