diff options
| author | xXx-caillou-xXx | 2018-08-28 14:24:29 +0200 |
|---|---|---|
| committer | jvoisin | 2018-08-28 12:24:29 +0000 |
| commit | aa5d6895d0ac8c6ea050a8ea55e2f8a39ddfe365 (patch) | |
| tree | c640e50ab007bae3a2fd55ca05bc13c73e293c69 /src/sp_config_utils.c | |
| parent | eff2c658d37108020215f838d4c47c176ec3e050 (diff) | |
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
Diffstat (limited to '')
| -rw-r--r-- | src/sp_config_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) { | |||
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | if (*line) { | 27 | if (*line) { |
| 28 | sp_log_err("config", "Trailing chars '%s' at the end of '%s' on line %zu.", | 28 | sp_log_err("config", "Trailing chars '%s' at the end of '%s' on line %zu", |
| 29 | line, original_line, sp_line_no); | 29 | line, original_line, sp_line_no); |
| 30 | return -1; | 30 | return -1; |
| 31 | } | 31 | } |
| @@ -91,12 +91,12 @@ zend_string *get_param(size_t *consumed, char *restrict line, sp_type type, | |||
| 91 | } | 91 | } |
| 92 | err: | 92 | err: |
| 93 | if (0 == j) { | 93 | if (0 == j) { |
| 94 | sp_log_err("error", "A valid string as parameter is expected on line %zu.", | 94 | sp_log_err("error", "A valid string as parameter is expected on line %zu", |
| 95 | sp_line_no); | 95 | sp_line_no); |
| 96 | } else { | 96 | } else { |
| 97 | sp_log_err("error", | 97 | sp_log_err("error", |
| 98 | "There is an issue with the parsing of '%s': it doesn't look " | 98 | "There is an issue with the parsing of '%s': it doesn't look " |
| 99 | "like a valid string on line %zu.", | 99 | "like a valid string on line %zu", |
| 100 | original_line ? original_line : "NULL", sp_line_no); | 100 | original_line ? original_line : "NULL", sp_line_no); |
| 101 | } | 101 | } |
| 102 | line = NULL; | 102 | line = NULL; |
