summaryrefslogtreecommitdiff
path: root/desktop/netsurf.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 /desktop/netsurf.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 'desktop/netsurf.c')
-rw-r--r--desktop/netsurf.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/desktop/netsurf.c b/desktop/netsurf.c
index 3baa936f3..8aa949a5a 100644
--- a/desktop/netsurf.c
+++ b/desktop/netsurf.c
@@ -89,7 +89,8 @@
static void netsurf_lwc_iterator(lwc_string *str, void *pw)
{
- LOG("[%3u] %.*s", str->refcnt, (int)lwc_string_length(str), lwc_string_data(str));
+ NSLOG(netsurf, INFO, "[%3u] %.*s", str->refcnt,
+ (int)lwc_string_length(str), lwc_string_data(str));
}
/**
@@ -165,8 +166,9 @@ nserror netsurf_init(const char *store_path)
if (hlcache_parameters.llcache.limit < MINIMUM_MEMORY_CACHE_SIZE) {
hlcache_parameters.llcache.limit = MINIMUM_MEMORY_CACHE_SIZE;
- LOG("Setting minimum memory cache size %" PRIsizet,
- hlcache_parameters.llcache.limit);
+ NSLOG(netsurf, INFO,
+ "Setting minimum memory cache size %"PRIsizet,
+ hlcache_parameters.llcache.limit);
}
/* Set up the max attempts made to fetch a timing out resource */
@@ -243,19 +245,19 @@ void netsurf_exit(void)
{
hlcache_stop();
- LOG("Closing GUI");
+ NSLOG(netsurf, INFO, "Closing GUI");
guit->misc->quit();
- LOG("Finalising JavaScript");
+ NSLOG(netsurf, INFO, "Finalising JavaScript");
js_finalise();
- LOG("Finalising Web Search");
+ NSLOG(netsurf, INFO, "Finalising Web Search");
search_web_finalise();
- LOG("Finalising high-level cache");
+ NSLOG(netsurf, INFO, "Finalising high-level cache");
hlcache_finalise();
- LOG("Closing fetches");
+ NSLOG(netsurf, INFO, "Closing fetches");
fetcher_quit();
/* dump any remaining cache entries */
@@ -264,21 +266,21 @@ void netsurf_exit(void)
/* Clean up after content handlers */
content_factory_fini();
- LOG("Closing utf8");
+ NSLOG(netsurf, INFO, "Closing utf8");
utf8_finalise();
- LOG("Destroying URLdb");
+ NSLOG(netsurf, INFO, "Destroying URLdb");
urldb_destroy();
- LOG("Destroying System colours");
+ NSLOG(netsurf, INFO, "Destroying System colours");
ns_system_colour_finalize();
- LOG("Destroying Messages");
+ NSLOG(netsurf, INFO, "Destroying Messages");
messages_destroy();
corestrings_fini();
- LOG("Remaining lwc strings:");
+ NSLOG(netsurf, INFO, "Remaining lwc strings:");
lwc_iterate_strings(netsurf_lwc_iterator, NULL);
- LOG("Exited successfully");
+ NSLOG(netsurf, INFO, "Exited successfully");
}