From 75018632a9b953aafeae6f4e8aea607fd1d89dca Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 6 Sep 2017 18:28:12 +0100 Subject: 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); --- frontends/windows/download.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'frontends/windows/download.c') diff --git a/frontends/windows/download.c b/frontends/windows/download.c index 3a969834e..dfcd2b5a4 100644 --- a/frontends/windows/download.c +++ b/frontends/windows/download.c @@ -253,7 +253,8 @@ gui_download_window_create(download_context *ctx, struct gui_window *gui) strcat(destination, "/"); if (strlen(destination) + strlen(filename) < PATH_MAX - 1) strcat(destination, filename); - LOG("download %s [%s] from %s to %s", filename, size, domain, destination); + NSLOG(netsurf, INFO, "download %s [%s] from %s to %s", filename, + size, domain, destination); w->title = filename; w->domain = domain; w->size = total_size; @@ -313,7 +314,8 @@ gui_download_window_data(struct gui_download_window *w, const char *data, struct timeval val; res = fwrite((void *)data, 1, size, w->file); if (res != size) - LOG("file write error %d of %d", size - res, size); + NSLOG(netsurf, INFO, "file write error %d of %d", size - res, + size); w->downloaded += res; w->progress = (unsigned int)(((long long)(w->downloaded) * 10000) / w->size); @@ -327,7 +329,7 @@ gui_download_window_data(struct gui_download_window *w, const char *data, static void gui_download_window_error(struct gui_download_window *w, const char *error_msg) { - LOG("error %s", error_msg); + NSLOG(netsurf, INFO, "error %s", error_msg); } static void gui_download_window_done(struct gui_download_window *w) -- cgit v1.2.3