summaryrefslogtreecommitdiff
path: root/content/hlcache.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2017-09-06 18:28:12 +0100
committerVincent Sanders <vince@kyllikki.org>2017-09-06 18:45:27 +0100
commit75018632a9b953aafeae6f4e8aea607fd1d89dca (patch)
treed661d2fded2ad4b80c4cf019dee2954c052ab090 /content/hlcache.c
parent8d9b2efc11529da8cb5870b39ff15249c648b10a (diff)
downloadnetsurf-75018632a9b953aafeae6f4e8aea607fd1d89dca.tar.gz
netsurf-75018632a9b953aafeae6f4e8aea607fd1d89dca.tar.bz2
Use coccinelle to change logging macro calls in c files
for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done @@ expression E; @@ -LOG(E); +NSLOG(netsurf, INFO, E); @@ expression E, E1; @@ -LOG(E, E1); +NSLOG(netsurf, INFO, E, E1); @@ expression E, E1, E2; @@ -LOG(E, E1, E2); +NSLOG(netsurf, INFO, E, E1, E2); @@ expression E, E1, E2, E3; @@ -LOG(E, E1, E2, E3); +NSLOG(netsurf, INFO, E, E1, E2, E3); @@ expression E, E1, E2, E3, E4; @@ -LOG(E, E1, E2, E3, E4); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4); @@ expression E, E1, E2, E3, E4, E5; @@ -LOG(E, E1, E2, E3, E4, E5); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5); @@ expression E, E1, E2, E3, E4, E5, E6; @@ -LOG(E, E1, E2, E3, E4, E5, E6); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6); @@ expression E, E1, E2, E3, E4, E5, E6, E7; @@ -LOG(E, E1, E2, E3, E4, E5, E6, E7); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
Diffstat (limited to 'content/hlcache.c')
-rw-r--r--content/hlcache.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/content/hlcache.c b/content/hlcache.c
index 2242b73af..33436f7ed 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -195,7 +195,7 @@ static void hlcache_content_callback(struct content *c, content_msg msg,
error = handle->cb(handle, &event, handle->pw);
if (error != NSERROR_OK)
- LOG("Error in callback: %d", error);
+ NSLOG(netsurf, INFO, "Error in callback: %d", error);
}
/**
@@ -566,7 +566,8 @@ void hlcache_finalise(void)
num_contents++;
}
- LOG("%d contents remain before cache drain", num_contents);
+ NSLOG(netsurf, INFO, "%d contents remain before cache drain",
+ num_contents);
/* Drain cache */
do {
@@ -580,14 +581,17 @@ void hlcache_finalise(void)
}
} while (num_contents > 0 && num_contents != prev_contents);
- LOG("%d contents remaining:", num_contents);
+ NSLOG(netsurf, INFO, "%d contents remaining:", num_contents);
for (entry = hlcache->content_list; entry != NULL; entry = entry->next) {
hlcache_handle entry_handle = { entry, NULL, NULL };
if (entry->content != NULL) {
- LOG(" %p : %s (%d users)", entry, nsurl_access(hlcache_handle_get_url(&entry_handle)), content_count_users(entry->content));
+ NSLOG(netsurf, INFO, " %p : %s (%d users)",
+ entry,
+ nsurl_access(hlcache_handle_get_url(&entry_handle)),
+ content_count_users(entry->content));
} else {
- LOG(" %p", entry);
+ NSLOG(netsurf, INFO, " %p", entry);
}
}
@@ -615,12 +619,13 @@ void hlcache_finalise(void)
hlcache->retrieval_ctx_ring = NULL;
}
- LOG("hit/miss %d/%d", hlcache->hit_count, hlcache->miss_count);
+ NSLOG(netsurf, INFO, "hit/miss %d/%d", hlcache->hit_count,
+ hlcache->miss_count);
free(hlcache);
hlcache = NULL;
- LOG("Finalising low-level cache");
+ NSLOG(netsurf, INFO, "Finalising low-level cache");
llcache_finalise();
}