MCPcopy Create free account
hub / github.com/apache/httpd / do_debug_log

Function do_debug_log

modules/loggers/mod_log_debug.c:56–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54};
55
56static void do_debug_log(request_rec *r, const char *hookname)
57{
58 log_debug_dirconf *dconf = ap_get_module_config(r->per_dir_config, &log_debug_module);
59 int i;
60 if (dconf->entries == NULL)
61 return;
62
63 for (i = 0; i < dconf->entries->nelts; i++) {
64 const char *msg, *err;
65 msg_entry *entry = APR_ARRAY_IDX(dconf->entries, i, msg_entry *);
66 if (entry->hook != allhooks && entry->hook != hookname)
67 continue;
68 if (entry->condition) {
69 int ret = ap_expr_exec(r, entry->condition, &err);
70 if (err) {
71 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00640)
72 "Can't evaluate condition: %s", err);
73 continue;
74 }
75 if (!ret)
76 continue;
77 }
78 msg = ap_expr_str_exec(r, entry->msg_expr, &err);
79 if (err)
80 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00641)
81 "Can't evaluate message expression: %s", err);
82 if (APLOGrdebug(r))
83 /* Intentional no APLOGNO */
84 ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
85 "%s (%s hook, %s:%d)",
86 msg, hookname, entry->msg_expr->filename,
87 entry->msg_expr->line_number);
88 else
89 /* Intentional no APLOGNO */
90 ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
91 "%s", msg);
92 }
93}
94
95static int log_debug_log_transaction(request_rec *r)
96{

Callers 13

log_debug_quick_handlerFunction · 0.85
log_debug_handlerFunction · 0.85
log_debug_translate_nameFunction · 0.85
log_debug_map_to_storageFunction · 0.85
log_debug_fixupsFunction · 0.85
log_debug_type_checkerFunction · 0.85
log_debug_check_accessFunction · 0.85
log_debug_check_authnFunction · 0.85
log_debug_check_authzFunction · 0.85

Calls 3

ap_get_module_configFunction · 0.85
ap_expr_execFunction · 0.85
ap_expr_str_execFunction · 0.85

Tested by

no test coverage detected