aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_script.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2008-12-11 06:38:14 +0000
committerIgor Sysoev <igor@sysoev.ru>2008-12-11 06:38:14 +0000
commit0e179536791a9b31fa9812cb0073205ea2ca3626 (patch)
treea6272ef3b2b039b31da3ac0cfa463b4650bdfb5d /src/http/ngx_http_script.c
parent0c54fef3e044a41825f7eefbe8460918a63ac172 (diff)
downloadnginx-0e179536791a9b31fa9812cb0073205ea2ca3626.tar.gz
nginx-0e179536791a9b31fa9812cb0073205ea2ca3626.zip
fix r2394
Diffstat (limited to 'src/http/ngx_http_script.c')
-rw-r--r--src/http/ngx_http_script.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/http/ngx_http_script.c b/src/http/ngx_http_script.c
index a5693214b..dd9db62fb 100644
--- a/src/http/ngx_http_script.c
+++ b/src/http/ngx_http_script.c
@@ -620,7 +620,7 @@ ngx_http_script_regex_start_code(ngx_http_script_engine_t *e)
rc = ngx_regex_exec(code->regex, &e->line, e->captures, code->ncaptures);
if (rc == NGX_REGEX_NO_MATCHED) {
- if (e->log) {
+ if (e->log || (r->connection->log->log_level & NGX_LOG_DEBUG_HTTP)) {
ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0,
"\"%V\" does not match \"%V\"",
&code->name, &e->line);
@@ -658,7 +658,7 @@ ngx_http_script_regex_start_code(ngx_http_script_engine_t *e)
return;
}
- if (e->log) {
+ if (e->log || (r->connection->log->log_level & NGX_LOG_DEBUG_HTTP)) {
ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0,
"\"%V\" matches \"%V\"", &code->name, &e->line);
}
@@ -794,15 +794,10 @@ ngx_http_script_regex_end_code(ngx_http_script_engine_t *e)
e->buf.len = e->pos - e->buf.data;
-#if (NGX_DEBUG)
- ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0,
- "rewritten redirect: \"%V\"", &e->buf);
-#else
- if (e->log) {
+ if (e->log || (r->connection->log->log_level & NGX_LOG_DEBUG_HTTP)) {
ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0,
"rewritten redirect: \"%V\"", &e->buf);
}
-#endif
r->headers_out.location = ngx_list_push(&r->headers_out.headers);
if (r->headers_out.location == NULL) {
@@ -841,16 +836,11 @@ ngx_http_script_regex_end_code(ngx_http_script_engine_t *e)
}
}
-#if (NGX_DEBUG)
- ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0,
- "rewritten data: \"%V\", args: \"%V\"", &e->buf, &r->args);
-#else
- if (e->log) {
+ if (e->log || (r->connection->log->log_level & NGX_LOG_DEBUG_HTTP)) {
ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0,
"rewritten data: \"%V\", args: \"%V\"",
&e->buf, &r->args);
}
-#endif
if (code->uri) {
r->uri = e->buf;