summaryrefslogtreecommitdiffstats
path: root/server/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/core.c')
-rw-r--r--server/core.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/server/core.c b/server/core.c
index 5653b4db3e..13c60e8ca1 100644
--- a/server/core.c
+++ b/server/core.c
@@ -4080,24 +4080,26 @@ static const char *set_recursion_limit(cmd_parms *cmd, void *dummy,
static void log_backtrace(const request_rec *r)
{
- const request_rec *top = r;
-
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00121)
- "r->uri = %s", r->uri ? r->uri : "(unexpectedly NULL)");
-
- while (top && (top->prev || top->main)) {
- if (top->prev) {
- top = top->prev;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00122)
- "redirected from r->uri = %s",
- top->uri ? top->uri : "(unexpectedly NULL)");
- }
+ if (APLOGrdebug(r)) {
+ const request_rec *top = r;
+
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00121)
+ "r->uri = %s", r->uri ? r->uri : "(unexpectedly NULL)");
+
+ while (top && (top->prev || top->main)) {
+ if (top->prev) {
+ top = top->prev;
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00122)
+ "redirected from r->uri = %s",
+ top->uri ? top->uri : "(unexpectedly NULL)");
+ }
- if (!top->prev && top->main) {
- top = top->main;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00123)
- "subrequested from r->uri = %s",
- top->uri ? top->uri : "(unexpectedly NULL)");
+ if (!top->prev && top->main) {
+ top = top->main;
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00123)
+ "subrequested from r->uri = %s",
+ top->uri ? top->uri : "(unexpectedly NULL)");
+ }
}
}
}