From 9fecbc655474bef3001c1c424c2e7c8c92c6010e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 9 Aug 2018 16:31:16 +0100 Subject: 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. --- content/content.c | 18 +++++++++--------- 1 file 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); } -- cgit v1.2.3