From aa5d6895d0ac8c6ea050a8ea55e2f8a39ddfe365 Mon Sep 17 00:00:00 2001 From: xXx-caillou-xXx Date: Tue, 28 Aug 2018 14:24:29 +0200 Subject: Use php's logging functions This commit replace our usage of `php_log_err` with `zend_error`. This should allow administrators to display errors in the webpage, should they want to; and to properly manipulate the verbosity's level. This should close #217 --- src/sp_config_utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sp_config_utils.c') diff --git a/src/sp_config_utils.c b/src/sp_config_utils.c index d72561b..71c9071 100644 --- a/src/sp_config_utils.c +++ b/src/sp_config_utils.c @@ -25,7 +25,7 @@ int parse_keywords(sp_config_functions *funcs, char *line) { } if (*line) { - sp_log_err("config", "Trailing chars '%s' at the end of '%s' on line %zu.", + sp_log_err("config", "Trailing chars '%s' at the end of '%s' on line %zu", line, original_line, sp_line_no); return -1; } @@ -91,12 +91,12 @@ zend_string *get_param(size_t *consumed, char *restrict line, sp_type type, } err: if (0 == j) { - sp_log_err("error", "A valid string as parameter is expected on line %zu.", + sp_log_err("error", "A valid string as parameter is expected on line %zu", sp_line_no); } else { sp_log_err("error", "There is an issue with the parsing of '%s': it doesn't look " - "like a valid string on line %zu.", + "like a valid string on line %zu", original_line ? original_line : "NULL", sp_line_no); } line = NULL; -- cgit v1.3