summaryrefslogtreecommitdiff
path: root/src/sp_utils.c
diff options
context:
space:
mode:
authorsimon MAGNIN-FEYSOT2018-05-03 10:22:55 +0200
committerjvoisin2018-05-03 08:22:55 +0000
commit41b8db89d5f50aadad91d2b0fd9861017b58bb16 (patch)
tree71ba20e325afef65f1ea4823cfbd82ae932149cc /src/sp_utils.c
parentfa9eb1168029b05a18f21d7a30786c4e21fddc12 (diff)
Uniformise some logs
This commit will make certain logs easier to parse.
Diffstat (limited to 'src/sp_utils.c')
-rw-r--r--src/sp_utils.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c
index 5f34ccc..c0b2fb9 100644
--- a/src/sp_utils.c
+++ b/src/sp_utils.c
@@ -202,24 +202,24 @@ void sp_log_disable(const char* restrict path, const char* restrict arg_name,
202 if (alias) { 202 if (alias) {
203 sp_log_msg( 203 sp_log_msg(
204 "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, 204 "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP,
205 "The call to the function '%s' in %s:%d has been disabled, " 205 "Aborted execution on call of the function '%s' in %s:%d, "
206 "because its argument '%s' content (%s) matched the rule '%s'.", 206 "because its argument '%s' content (%s) matched the rule '%s'.",
207 path, filename, line, arg_name, arg_value ? arg_value : "?", alias); 207 path, filename, line, arg_name, arg_value ? arg_value : "?", alias);
208 } else { 208 } else {
209 sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, 209 sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP,
210 "The call to the function '%s' in %s:%d has been disabled, " 210 "Aborted execution on call of the function '%s' in %s:%d, "
211 "because its argument '%s' content (%s) matched a rule.", 211 "because its argument '%s' content (%s) matched a rule.",
212 path, filename, line, arg_name, arg_value ? arg_value : "?"); 212 path, filename, line, arg_name, arg_value ? arg_value : "?");
213 } 213 }
214 } else { 214 } else {
215 if (alias) { 215 if (alias) {
216 sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, 216 sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP,
217 "The call to the function '%s' in %s:%d has been disabled, " 217 "Aborted execution on call of the function '%s' in %s:%d, "
218 "because of the the rule '%s'.", 218 "because of the the rule '%s'.",
219 path, filename, line, alias); 219 path, filename, line, alias);
220 } else { 220 } else {
221 sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, 221 sp_log_msg("disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP,
222 "The call to the function '%s' in %s:%d has been disabled.", 222 "Aborted execution on call of the function '%s' in %s:%d.",
223 path, filename, line); 223 path, filename, line);
224 } 224 }
225 } 225 }
@@ -238,18 +238,18 @@ void sp_log_disable_ret(const char* restrict path,
238 if (alias) { 238 if (alias) {
239 sp_log_msg( 239 sp_log_msg(
240 "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, 240 "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP,
241 "The execution has been aborted in %s:%d, " 241 "Aborted execution on return of the function '%s' in %s:%d, "
242 "because the function '%s' returned '%s', which matched the rule '%s'.", 242 "because the function returned '%s', which matched the rule '%s'.",
243 zend_get_executed_filename(TSRMLS_C), 243 path, zend_get_executed_filename(TSRMLS_C),
244 zend_get_executed_lineno(TSRMLS_C), path, ret_value ? ret_value : "?", 244 zend_get_executed_lineno(TSRMLS_C), ret_value ? ret_value : "?",
245 alias); 245 alias);
246 } else { 246 } else {
247 sp_log_msg( 247 sp_log_msg(
248 "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP, 248 "disabled_function", sim ? SP_LOG_SIMULATION : SP_LOG_DROP,
249 "The execution has been aborted in %s:%d, " 249 "Aborted execution on return of the function '%s' in %s:%d, "
250 "because the return value (%s) of the function '%s' matched a rule.", 250 "because the function returned '%s', which matched a rule.",
251 zend_get_executed_filename(TSRMLS_C), 251 path, zend_get_executed_filename(TSRMLS_C),
252 zend_get_executed_lineno(TSRMLS_C), ret_value ? ret_value : "?", path); 252 zend_get_executed_lineno(TSRMLS_C), ret_value ? ret_value : "?");
253 } 253 }
254 if (dump) { 254 if (dump) {
255 sp_log_request(dump, config_node->textual_representation, 255 sp_log_request(dump, config_node->textual_representation,