httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1198995 - in /httpd/httpd/trunk: docs/manual/mod/mod_proxy_html.xml modules/filters/mod_proxy_html.c
Date Mon, 07 Nov 2011 23:07:13 GMT
Author: sf
Date: Mon Nov  7 23:07:12 2011
New Revision: 1198995

URL: http://svn.apache.org/viewvc?rev=1198995&view=rev
Log:
Remove ProxyHTMLLogVerbose in favor of trace loglevels

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_proxy_html.xml
    httpd/httpd/trunk/modules/filters/mod_proxy_html.c

Modified: httpd/httpd/trunk/docs/manual/mod/mod_proxy_html.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_proxy_html.xml?rev=1198995&r1=1198994&r2=1198995&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_proxy_html.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_proxy_html.xml Mon Nov  7 23:07:12 2011
@@ -259,24 +259,6 @@ filter chain if stripping comments!</p>
 </directivesynopsis>
 
 <directivesynopsis>
-<name>ProxyHTMLLogVerbose</name>
-<description>Enables extra verbose logging for debug</description>
-<syntax>ProxyHTMLLogVerbose <var>On|Off</var></syntax>
-<contextlist><context>server config</context>
-<context>virtual host</context><context>directory</context>
-</contextlist>
-<compatibility>Version 2.4 and later; available as a third-party
-for earlier 2.x versions</compatibility>
-<usage>
-<p>If On, mod_proxy_html will log extra diagnostic information (at
-<directive module="mod_log_config">LogLevel</directive> Info)
-including charset detection and processing and
-<directive>ProxyHTMLURLMap</directive> matches and rewrites.
-This may be helpful in debugging a configuration.</p>
-</usage>
-</directivesynopsis>
-
-<directivesynopsis>
 <name>ProxyHTMLBufSize</name>
 <description>Sets the buffer size increment for buffering inline scripts and
 stylesheets.</description>

Modified: httpd/httpd/trunk/modules/filters/mod_proxy_html.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_proxy_html.c?rev=1198995&r1=1198994&r2=1198995&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_proxy_html.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_proxy_html.c Mon Nov  7 23:07:12 2011
@@ -18,12 +18,7 @@
  */
 
 /*      GO_FASTER
-        You can #define GO_FASTER to disable informational logging.
-        This disables the ProxyHTMLLogVerbose option altogether.
-
-        Default is to leave it undefined, and enable verbose logging
-        as a configuration option.  Binaries are supplied with verbose
-        logging enabled.
+        You can #define GO_FASTER to disable trace logging.
 */
 
 #ifdef GO_FASTER
@@ -109,9 +104,6 @@ typedef struct {
     int strip_comments;
     int interp;
     int enabled;
-#ifndef GO_FASTER
-    int verbose;
-#endif
 } proxy_html_conf;
 typedef struct {
     ap_filter_t* f;
@@ -222,7 +214,7 @@ static void dump_content(saxctxt* ctx)
     size_t len, offs;
     urlmap* themap = ctx->map;
 #ifndef GO_FASTER
-    int verbose = ctx->cfg->verbose;
+    int verbose = APLOGrtrace1(ctx->f->r);
 #endif
 
     pappend(ctx, &c, 1);        /* append null byte */
@@ -244,7 +236,7 @@ static void dump_content(saxctxt* ctx)
                 VERBOSEB(
                     const char* f = apr_pstrndup(ctx->f->r->pool,
                     ctx->buf + offs, s_from);
-                    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, ctx->f->r,
+                    ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, ctx->f->r,
                                   "C/RX: match at %s, substituting %s", f, subs);
                 )
                 if (s_to > s_from) {
@@ -272,7 +264,7 @@ static void dump_content(saxctxt* ctx)
                 len = strlen(ctx->buf);
                 if ((m->flags & M_ATEND) && (match < (len - s_from)))
                     continue;
-                VERBOSE(ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, ctx->f->r,
+                VERBOSE(ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, ctx->f->r,
                                       "C: matched %s, substituting %s",
                                       m->from.c, m->to));
                 if (s_to > s_from) {
@@ -368,7 +360,7 @@ static void pstartElement(void* ctxt, co
     size_t nmatch;
     ap_regmatch_t pmatch[10];
 #ifndef GO_FASTER
-    int verbose = ctx->cfg->verbose;
+    int verbose = APLOGrtrace1(ctx->f->r);
 #endif
     apr_array_header_t *linkattrs;
     int i;
@@ -483,7 +475,7 @@ static void pstartElement(void* ctxt, co
                                     const char* f;
                                     f = apr_pstrndup(ctx->f->r->pool,
                                                      ctx->buf + offs, s_from);
-                                    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0,
+                                    ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0,
                                                   ctx->f->r,
                                          "H/RX: match at %s, substituting %s",
                                                   f, subs);
@@ -510,7 +502,7 @@ static void pstartElement(void* ctxt, co
                                 ++num_match;
                                 s_to = strlen(m->to);
                                 len = strlen(ctx->buf);
-                                VERBOSE(ap_log_rerror(APLOG_MARK, APLOG_INFO,
+                                VERBOSE(ap_log_rerror(APLOG_MARK, APLOG_TRACE3,
                                                       0, ctx->f->r,
                                               "H: matched %s, substituting %s",
                                                       m->from.c, m->to));
@@ -551,7 +543,7 @@ static void pstartElement(void* ctxt, co
                                     const char* f;
                                     f = apr_pstrndup(ctx->f->r->pool,
                                                      ctx->buf + offs, s_from);
-                                    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0,
+                                    ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0,
                                                   ctx->f->r,
                                            "E/RX: match at %s, substituting %s",
                                                   f, subs);
@@ -594,7 +586,7 @@ static void pstartElement(void* ctxt, co
                                     found = strstr(ctx->buf+match+s_to,
                                                    m->from.c);
                                 }
-                                VERBOSE(ap_log_rerror(APLOG_MARK, APLOG_INFO,
+                                VERBOSE(ap_log_rerror(APLOG_MARK, APLOG_TRACE3,
                                                       0, ctx->f->r,
                                               "E: matched %s, substituting %s",
                                                       m->from.c, m->to));
@@ -653,11 +645,7 @@ static void pstartElement(void* ctxt, co
     }
 }
 
-static meta* metafix(request_rec* r, const char* buf
-#ifndef GO_FASTER
-                    , int verbose
-#endif
-       )
+static meta* metafix(request_rec* r, const char* buf)
 {
     meta* ret = NULL;
     size_t offs = 0;
@@ -705,9 +693,11 @@ static meta* metafix(request_rec* r, con
             ret->end = pmatch[0].rm_eo;
         }
         if (header && content) {
-            VERBOSE(ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
-                                  "Adding header [%s: %s] from HTML META",
-                                  header, content)); 
+#ifndef GO_FASTER
+            ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
+                          "Adding header [%s: %s] from HTML META",
+                          header, content); 
+#endif
             apr_table_setn(r->headers_out, header, content);
         }
         offs += pmatch[0].rm_eo;
@@ -749,7 +739,7 @@ static const char* interpolate_vars(requ
                 replacement = "";
         }
         str = apr_pstrcat(r->pool, before, replacement, after, NULL);
-        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+        ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
                       "Interpolating %s  =>  %s", var, replacement);
     }
     return str;
@@ -846,9 +836,7 @@ static saxctxt* check_filter_init (ap_fi
 
         if (errmsg) {
 #ifndef GO_FASTER
-            if (cfg->verbose) {
-                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, f->r, "%s", errmsg);
-            }
+            ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, f->r, "%s", errmsg);
 #endif
             ap_remove_output_filter(f);
             return NULL;
@@ -955,11 +943,7 @@ static int proxy_html_filter(ap_filter_t
                                   "Unsupported parser opts %x", xmlopts);
 #endif
                 if (ctxt->cfg->metafix)
-#ifndef GO_FASTER
-                    m = metafix(f->r, buf, ctxt->cfg->verbose);
-#else
                     m = metafix(f->r, buf);
-#endif
                 if (m) {
                     consume_buffer(ctxt, buf, m->start, 0);
                     consume_buffer(ctxt, buf+m->end, bytes-m->end, 0);
@@ -1033,9 +1017,6 @@ static void* proxy_html_merge(apr_pool_t
         conf->interp = add->interp;
         conf->strip_comments = add->strip_comments;
         conf->enabled = add->enabled;
-#ifndef GO_FASTER
-        conf->verbose = add->verbose;
-#endif
     }
     else {
         conf->flags = base->flags | add->flags;
@@ -1044,9 +1025,6 @@ static void* proxy_html_merge(apr_pool_t
         conf->interp = base->interp | add->interp;
         conf->strip_comments = base->strip_comments | add->strip_comments;
         conf->enabled = add->enabled | base->enabled;
-#ifndef GO_FASTER
-        conf->verbose = base->verbose | add->verbose;
-#endif
     }
     return conf;
 }
@@ -1232,12 +1210,6 @@ static const command_rec proxy_html_cmds
     AP_INIT_FLAG("ProxyHTMLStripComments", ap_set_flag_slot,
                  (void*)APR_OFFSETOF(proxy_html_conf, strip_comments),
                  RSRC_CONF|ACCESS_CONF, "Strip out comments"),
-#ifndef GO_FASTER
-    AP_INIT_FLAG("ProxyHTMLLogVerbose", ap_set_flag_slot,
-                 (void*)APR_OFFSETOF(proxy_html_conf, verbose),
-                 RSRC_CONF|ACCESS_CONF,
-                 "Verbose Logging (use with LogLevel Info)"),
-#endif
     AP_INIT_TAKE1("ProxyHTMLBufSize", ap_set_int_slot,
                   (void*)APR_OFFSETOF(proxy_html_conf, bufsz),
                   RSRC_CONF|ACCESS_CONF, "Buffer size"),



Mime
View raw message