md_json_readf: log if json_load_callback() fails
Help with debugging problems here -- not all callers will propagate
errors from md_json_readf() up to the top level (e.g. the "purge"
logic).
@@ -924,6 +924,11 @@ apr_status_t md_json_readf(md_json_t **pjson, apr_pool_t *p, const char *fpath)
if (j) {
*pjson = json_create(p, j);
}
+ else {
+ md_log_perror(MD_LOG_MARK, MD_LOG_ERR, 0, p,
+ "failed to load JSON file %s: %s (line %d:%d)",
+ fpath, error.text, error.line, error.column);
+ }
apr_file_close(f);
return (j && *pjson) ? APR_SUCCESS : APR_EINVAL;
}
