From 922b9f5e393579f11de7c0072d96218ca32a0ba8 Mon Sep 17 00:00:00 2001 From: Kurt Schwehr Date: Wed, 21 Mar 2018 15:34:38 -0700 Subject: 3 -> PJ_LOG_TRACE for pj_log level in pj_init.c Bare literals are hard to follow and inconsisten with the rest of proj. --- src/pj_init.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/pj_init.c b/src/pj_init.c index 29368cbd..9b06ff28 100644 --- a/src/pj_init.c +++ b/src/pj_init.c @@ -126,7 +126,9 @@ static char *get_init_string (PJ_CONTEXT *ctx, char *name) { *section = 0; section++; n = strlen (section); - pj_log (ctx, 3, "get_init_string: searching for section [%s] in init file [%s]", section, fname); + pj_log (ctx, PJ_LOG_TRACE, + "get_init_string: searching for section [%s] in init file [%s]", + section, fname); fid = pj_open_lib (ctx, fname, "rt"); if (0==fid) { @@ -216,7 +218,7 @@ static char *get_init_string (PJ_CONTEXT *ctx, char *name) { if (0==buffer) return 0; pj_shrink (buffer); - pj_log (ctx, 3, "key=%s, value: [%s]", key, buffer); + pj_log (ctx, PJ_LOG_TRACE, "key=%s, value: [%s]", key, buffer); return buffer; } @@ -236,7 +238,7 @@ Expand key from buffer or (if not in buffer) from init file xkey = key; else xkey += 5; - pj_log (ctx, 3, "get_init: searching cache for key: [%s]", xkey); + pj_log (ctx, PJ_LOG_TRACE, "get_init: searching cache for key: [%s]", xkey); /* Is file/key pair already in cache? */ init_items = pj_search_initcache (xkey); @@ -244,13 +246,17 @@ Expand key from buffer or (if not in buffer) from init file return init_items; /* If not, we must read it from file */ - pj_log (ctx, 3, "get_init: searching on in init files for [%s]", xkey); + pj_log (ctx, PJ_LOG_TRACE, + "get_init: searching on in init files for [%s]", xkey); definition = get_init_string (ctx, xkey); if (0==definition) return 0; init_items = string_to_paralist (ctx, definition); if (init_items) - pj_log (ctx, 3, "get_init: got [%s], paralist[0,1]: [%s,%s]", definition, init_items->param, init_items->next? init_items->next->param: "(empty)"); + pj_log (ctx, PJ_LOG_TRACE, "get_init: got [%s], paralist[0,1]: [%s,%s]", + definition, + init_items->param, + init_items->next ? init_items->next->param : "(empty)"); pj_dealloc (definition); if (0==init_items) return 0; -- cgit v1.2.3