summaryrefslogtreecommitdiff
path: root/utils/nsoption.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 /utils/nsoption.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 'utils/nsoption.c')
-rw-r--r--utils/nsoption.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/nsoption.c b/utils/nsoption.c
index 8f05a911b..15f89ca5d 100644
--- a/utils/nsoption.c
+++ b/utils/nsoption.c
@@ -648,11 +648,12 @@ nsoption_read(const char *path, struct nsoption_s *opts)
fp = fopen(path, "r");
if (!fp) {
- LOG("Failed to open file '%s'", path);
+ NSLOG(netsurf, INFO, "Failed to open file '%s'", path);
return NSERROR_NOT_FOUND;
}
- LOG("Successfully opened '%s' for Options file", path);
+ NSLOG(netsurf, INFO, "Successfully opened '%s' for Options file",
+ path);
while (fgets(s, NSOPTION_MAX_LINE_LEN, fp)) {
char *colon, *value;
@@ -718,7 +719,8 @@ nsoption_write(const char *path,
fp = fopen(path, "w");
if (!fp) {
- LOG("failed to open file '%s' for writing", path);
+ NSLOG(netsurf, INFO, "failed to open file '%s' for writing",
+ path);
return NSERROR_NOT_FOUND;
}
@@ -798,7 +800,7 @@ nsoption_commandline(int *pargc, char **argv, struct nsoption_s *opts)
/* arg+arglen is the option to set, val is the value */
- LOG("%.*s = %s", arglen, arg, val);
+ NSLOG(netsurf, INFO, "%.*s = %s", arglen, arg, val);
for (entry_loop = 0;
entry_loop < NSOPTION_LISTEND;