summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2018-08-09 16:31:16 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2018-08-09 16:31:16 +0100
commit9fecbc655474bef3001c1c424c2e7c8c92c6010e (patch)
tree8e932c9a17c6fceae1da5b7788fb1fa96165c516 /content
parentfa546661ad7365507f8dde5d75fb27fae63f27a2 (diff)
downloadnetsurf-9fecbc655474bef3001c1c424c2e7c8c92c6010e.tar.gz
netsurf-9fecbc655474bef3001c1c424c2e7c8c92c6010e.tar.bz2
Content: Log URLs with nsurl_access_log().
This reduces the log file size for startup and a single visit to https://www.bbc.co.uk/news from 266133 to 178777 bytes, by not dumping big data URLs over and over into the log.
Diffstat (limited to 'content')
-rw-r--r--content/content.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/content/content.c b/content/content.c
index 9a240417d..a04051bda 100644
--- a/content/content.c
+++ b/content/content.c
@@ -74,7 +74,7 @@ nserror content__init(struct content *c, const content_handler *handler,
nserror error;
NSLOG(netsurf, INFO, "url "URL_FMT_SPC" -> %p",
- nsurl_access(llcache_handle_get_url(llcache)), c);
+ nsurl_access_log(llcache_handle_get_url(llcache)), c);
user_sentinel = calloc(1, sizeof(struct content_user));
if (user_sentinel == NULL) {
@@ -274,7 +274,7 @@ void content_convert(struct content *c)
return;
NSLOG(netsurf, INFO, "content "URL_FMT_SPC" (%p)",
- nsurl_access(llcache_handle_get_url(c->llcache)), c);
+ nsurl_access_log(llcache_handle_get_url(c->llcache)), c);
if (c->handler->data_complete != NULL) {
c->locked = true;
@@ -379,7 +379,7 @@ void content_destroy(struct content *c)
assert(c);
NSLOG(netsurf, INFO, "content %p %s", c,
- nsurl_access(llcache_handle_get_url(c->llcache)));
+ nsurl_access_log(llcache_handle_get_url(c->llcache)));
assert(c->locked == false);
if (c->handler->destroy != NULL)
@@ -658,8 +658,8 @@ bool content_add_user(
struct content_user *user;
NSLOG(netsurf, INFO, "content "URL_FMT_SPC" (%p), user %p %p",
- nsurl_access(llcache_handle_get_url(c->llcache)), c, callback,
- pw);
+ nsurl_access_log(llcache_handle_get_url(c->llcache)),
+ c, callback, pw);
user = malloc(sizeof(struct content_user));
if (!user)
return false;
@@ -693,8 +693,8 @@ void content_remove_user(
{
struct content_user *user, *next;
NSLOG(netsurf, INFO, "content "URL_FMT_SPC" (%p), user %p %p",
- nsurl_access(llcache_handle_get_url(c->llcache)), c, callback,
- pw);
+ nsurl_access_log(llcache_handle_get_url(c->llcache)),
+ c, callback, pw);
/* user_list starts with a sentinel */
for (user = c->user_list; user->next != 0 &&
@@ -816,7 +816,7 @@ void content_open(hlcache_handle *h, struct browser_window *bw,
struct content *c = hlcache_handle_get_content(h);
assert(c != 0);
NSLOG(netsurf, INFO, "content %p %s", c,
- nsurl_access(llcache_handle_get_url(c->llcache)));
+ nsurl_access_log(llcache_handle_get_url(c->llcache)));
if (c->handler->open != NULL)
c->handler->open(c, bw, page, params);
}
@@ -833,7 +833,7 @@ void content_close(hlcache_handle *h)
struct content *c = hlcache_handle_get_content(h);
assert(c != 0);
NSLOG(netsurf, INFO, "content %p %s", c,
- nsurl_access(llcache_handle_get_url(c->llcache)));
+ nsurl_access_log(llcache_handle_get_url(c->llcache)));
if (c->handler->close != NULL)
c->handler->close(c);
}