diff options
author | Stefan Fritsch <sf@apache.org> | 2011-12-03 00:02:04 +0100 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2011-12-03 00:02:04 +0100 |
commit | 92e366007c7936f44eef10f88a7042bc5a663c05 (patch) | |
tree | 491eaace700df8e1a764c7dfbe25335d497d0dcb /modules/mappers | |
parent | mod_proxy: Make ap_proxy_retry_worker() into an optional function. Allows (diff) | |
download | apache2-92e366007c7936f44eef10f88a7042bc5a663c05.tar.xz apache2-92e366007c7936f44eef10f88a7042bc5a663c05.zip |
Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/mappers')
-rw-r--r-- | modules/mappers/mod_actions.c | 2 | ||||
-rw-r--r-- | modules/mappers/mod_alias.c | 12 | ||||
-rw-r--r-- | modules/mappers/mod_imagemap.c | 6 | ||||
-rw-r--r-- | modules/mappers/mod_negotiation.c | 22 | ||||
-rw-r--r-- | modules/mappers/mod_rewrite.c | 36 |
5 files changed, 39 insertions, 39 deletions
diff --git a/modules/mappers/mod_actions.c b/modules/mappers/mod_actions.c index e1691c98c7..c311a3bef4 100644 --- a/modules/mappers/mod_actions.c +++ b/modules/mappers/mod_actions.c @@ -187,7 +187,7 @@ static int action_handler(request_rec *r) if (action && (t = apr_table_get(conf->action_types, action))) { if (*t++ == '0' && r->finfo.filetype == APR_NOFILE) { - ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00652) "File does not exist: %s", r->filename); return HTTP_NOT_FOUND; } diff --git a/modules/mappers/mod_alias.c b/modules/mappers/mod_alias.c index e0a17eacfb..0740cef0bf 100644 --- a/modules/mappers/mod_alias.c +++ b/modules/mappers/mod_alias.c @@ -137,7 +137,7 @@ static const char *add_alias_internal(cmd_parms *cmd, void *dummy, if ( (!alias->regexp && alias_matches(fake, alias->fake) > 0) || (alias->regexp && !ap_regexec(alias->regexp, fake, 0, NULL, 0))) { - ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00671) "The %s directive in %s at line %d will probably " "never match because it overlaps an earlier " "%sAlias%s.", @@ -383,7 +383,7 @@ static char *try_alias_list(request_rec *r, apr_array_header_t *aliases, } } else { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00672) "Regex substitution in '%s' failed. " "Replacement too long?", alias->real); return PREGSUB_ERROR; @@ -454,14 +454,14 @@ static int translate_alias_redir(request_rec *r) char *orig_target = ret; ret = ap_construct_url(r->pool, ret, r); - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00673) "incomplete redirection target of '%s' for " "URI '%s' modified to '%s'", orig_target, r->uri, ret); } if (!ap_is_url(ret)) { status = HTTP_INTERNAL_SERVER_ERROR; - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00674) "cannot redirect '%s' to '%s'; " "target is not a valid absoluteURI or abs_path", r->uri, ret); @@ -505,14 +505,14 @@ static int fixup_redir(request_rec *r) char *orig_target = ret; ret = ap_construct_url(r->pool, ret, r); - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00675) "incomplete redirection target of '%s' for " "URI '%s' modified to '%s'", orig_target, r->uri, ret); } if (!ap_is_url(ret)) { status = HTTP_INTERNAL_SERVER_ERROR; - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00676) "cannot redirect '%s' to '%s'; " "target is not a valid absoluteURI or abs_path", r->uri, ret); diff --git a/modules/mappers/mod_imagemap.c b/modules/mappers/mod_imagemap.c index c3de930df5..d7b01dd665 100644 --- a/modules/mappers/mod_imagemap.c +++ b/modules/mappers/mod_imagemap.c @@ -374,7 +374,7 @@ static char *imap_url(request_rec *r, const char *base, const char *value) /* must be a relative URL to be combined with base */ if (ap_strchr_c(base, '/') == NULL && (!strncmp(value, "../", 3) || !strcmp(value, ".."))) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00677) "invalid base directive in map file: %s", r->uri); return NULL; } @@ -434,7 +434,7 @@ static char *imap_url(request_rec *r, const char *base, const char *value) value */ } else if (directory) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00678) "invalid directory name in map file: %s", r->uri); return NULL; } @@ -844,7 +844,7 @@ static int imap_handler_internal(request_rec *r) we failed. They lose! */ need_2_fields: - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00679) "map file %s, line %d syntax error: requires at " "least two fields", r->uri, imap->line_number); /* fall through */ diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index 0d3c764951..cba118c611 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -685,7 +685,7 @@ static void parse_negotiate_header(request_rec *r, negotiation_state *neg) } #ifdef NEG_DEBUG - ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00680) "dont_fiddle_headers=%d use_rvsa=%d ua_supports_trans=%d " "send_alternates=%d, may_choose=%d", neg->dont_fiddle_headers, neg->use_rvsa, @@ -916,7 +916,7 @@ static char *lcase_header_name_return_body(char *header, request_rec *r) } if (!*cp) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00681) "Syntax error in type map, no ':' in %s for header %s", r->filename, header); return NULL; @@ -927,7 +927,7 @@ static char *lcase_header_name_return_body(char *header, request_rec *r) } while (*cp && apr_isspace(*cp)); if (!*cp) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00682) "Syntax error in type map --- no header body: %s for %s", r->filename, header); return NULL; @@ -955,7 +955,7 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg, if ((status = apr_file_open(map, rr->filename, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, neg->pool)) != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00683) "cannot access type map file: %s", rr->filename); if (APR_STATUS_IS_ENOTDIR(status) || APR_STATUS_IS_ENOENT(status)) { return HTTP_NOT_FOUND; @@ -999,7 +999,7 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg, body1 = ap_get_token(neg->pool, &body, 0); if (apr_strtoff(&number, body1, &errp, 10) != APR_SUCCESS || *errp || number < 0) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00684) "Parse error in type map, Content-Length: " "'%s' in %s is invalid.", body1, r->filename); @@ -1034,7 +1034,7 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg, while (--eol >= tag && apr_isspace(*eol)) *eol = '\0'; if ((mime_info.body = get_body(buffer, &len, tag, *map)) < 0) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00685) "Syntax error in type map, no end tag '%s'" "found in %s for Body: content.", tag, r->filename); @@ -1119,7 +1119,7 @@ static int read_types_multi(negotiation_state *neg) if ((status = apr_dir_open(&dirp, neg->dir_name, neg->pool)) != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00686) "cannot read directory for multi: %s", neg->dir_name); return HTTP_FORBIDDEN; } @@ -1291,7 +1291,7 @@ static int read_types_multi(negotiation_state *neg) * request must die. */ if (anymatch && !neg->avail_vars->nelts) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00687) "Negotiation: discovered file(s) matching request: %s" " (None could be negotiated).", r->filename); @@ -2063,7 +2063,7 @@ static int is_variant_better_rvsa(negotiation_state *neg, var_rec *variant, */ #ifdef NEG_DEBUG - ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00688) "Variant: file=%s type=%s lang=%s sourceq=%1.3f " "mimeq=%1.3f langq=%1.3f charq=%1.3f encq=%1.3f " "q=%1.5f definite=%d", @@ -2134,7 +2134,7 @@ static int is_variant_better(negotiation_state *neg, var_rec *variant, */ #ifdef NEG_DEBUG - ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00689) "Variant: file=%s type=%s lang=%s sourceq=%1.3f " "mimeq=%1.3f langq=%1.3f langidx=%d charq=%1.3f encq=%1.3f ", (variant->file_name ? variant->file_name : ""), @@ -2903,7 +2903,7 @@ static int do_negotiation(request_rec *r, negotiation_state *neg, } if (!*bestp) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00690) "no acceptable variant: %s", r->filename); return HTTP_NOT_ACCEPTABLE; } diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index d29cb454ef..970faff1d9 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -1118,7 +1118,7 @@ static char *select_random_value_part(request_rec *r, char *value) static void rewrite_child_errfn(apr_pool_t *p, apr_status_t err, const char *desc) { - ap_log_error(APLOG_MARK, APLOG_ERR, err, NULL, "%s", desc); + ap_log_error(APLOG_MARK, APLOG_ERR, err, NULL, APLOGNO(00653) "%s", desc); } static apr_status_t rewritemap_program_child(apr_pool_t *p, @@ -1194,7 +1194,7 @@ static apr_status_t run_rewritemap_programs(server_rec *s, apr_pool_t *p) rc = rewritemap_program_child(p, map->argv[0], map->argv, &fpout, &fpin); if (rc != APR_SUCCESS || fpin == NULL || fpout == NULL) { - ap_log_error(APLOG_MARK, APLOG_ERR, rc, s, + ap_log_error(APLOG_MARK, APLOG_ERR, rc, s, APLOGNO(00654) "mod_rewrite: could not start RewriteMap " "program %s", map->checkfile); return rc; @@ -1225,7 +1225,7 @@ static char *lookup_map_txtfile(request_rec *r, const char *file, char *key) if ((rv = apr_file_open(&fp, file, APR_READ|APR_BUFFERED, APR_OS_DEFAULT, r->pool)) != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00655) "mod_rewrite: can't open text RewriteMap file %s", file); return NULL; } @@ -1287,7 +1287,7 @@ static char *lookup_map_dbmfile(request_rec *r, const char *file, if ((rv = apr_dbm_open_ex(&dbmfp, dbmtype, file, APR_DBM_READONLY, APR_OS_DEFAULT, r->pool)) != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00656) "mod_rewrite: can't open DBM RewriteMap %s", file); return NULL; } @@ -1323,7 +1323,7 @@ static char *lookup_map_dbd(request_rec *r, char *key, const char *label) stmt, 0, key, NULL); if (rv != 0) { errmsg = apr_dbd_error(db->driver, db->handle, rv); - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00657) "rewritemap: error %s querying for %s", errmsg, key); return NULL; } @@ -1341,7 +1341,7 @@ static char *lookup_map_dbd(request_rec *r, char *key, const char *label) } if (rv != -1) { errmsg = apr_dbd_error(db->driver, db->handle, rv); - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00658) "rewritemap: error %s looking up %s", errmsg, key); } switch (n) { @@ -1391,7 +1391,7 @@ static char *lookup_map_program(request_rec *r, apr_file_t *fpin, if (rewrite_mapr_lock_acquire) { rv = apr_global_mutex_lock(rewrite_mapr_lock_acquire); if (rv != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00659) "apr_global_mutex_lock(rewrite_mapr_lock_acquire) " "failed"); return NULL; /* Maybe this should be fatal? */ @@ -1503,7 +1503,7 @@ static char *lookup_map_program(request_rec *r, apr_file_t *fpin, if (rewrite_mapr_lock_acquire) { rv = apr_global_mutex_unlock(rewrite_mapr_lock_acquire); if (rv != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00660) "apr_global_mutex_unlock(rewrite_mapr_lock_acquire) " "failed"); return NULL; /* Maybe this should be fatal? */ @@ -1546,7 +1546,7 @@ static char *lookup_map(request_rec *r, char *name, char *key) case MAPTYPE_TXT: rv = apr_stat(&st, s->checkfile, APR_FINFO_MIN, r->pool); if (rv != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00661) "mod_rewrite: can't access text RewriteMap file %s", s->checkfile); return NULL; @@ -1587,7 +1587,7 @@ static char *lookup_map(request_rec *r, char *name, char *key) case MAPTYPE_DBM: rv = apr_stat(&st, s->checkfile, APR_FINFO_MIN, r->pool); if (rv != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00662) "mod_rewrite: can't access DBM RewriteMap file %s", s->checkfile); } @@ -1596,7 +1596,7 @@ static char *lookup_map(request_rec *r, char *name, char *key) rv = apr_stat(&st2, s->checkfile2, APR_FINFO_MIN, r->pool); if (rv != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00663) "mod_rewrite: can't access DBM RewriteMap " "file %s", s->checkfile2); } @@ -2887,7 +2887,7 @@ static const char *cmd_rewriteoptions(cmd_parms *cmd, options |= OPTION_NOSLASH; } else if (!strncasecmp(w, "MaxRedirects=", 13)) { - ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00664) "RewriteOptions: MaxRedirects option has been " "removed in favor of the global " "LimitInternalRecursion directive and will be " @@ -3302,7 +3302,7 @@ static const char *cmd_rewritecond(cmd_parms *cmd, void *in_dconf, if ((newcond->ptype != CONDPAT_REGEX) && (newcond->ptype < CONDPAT_STR_LT || newcond->ptype > CONDPAT_STR_GE) && (newcond->flags & CONDFLAG_NOCASE)) { - ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00665) "RewriteCond: NoCase option for non-regex pattern '%s' " "is not supported and will be ignored. (%s:%d)", a2, cmd->directive->filename, cmd->directive->line_num); @@ -4345,7 +4345,7 @@ static void init_child(apr_pool_t *p, server_rec *s) rv = apr_global_mutex_child_init(&rewrite_mapr_lock_acquire, apr_global_mutex_lockfile(rewrite_mapr_lock_acquire), p); if (rv != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, + ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00666) "mod_rewrite: could not init rewrite_mapr_lock_acquire" " in child"); } @@ -4353,7 +4353,7 @@ static void init_child(apr_pool_t *p, server_rec *s) /* create the lookup cache */ if (!init_cache(p)) { - ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, + ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00667) "mod_rewrite: could not init map cache in child"); } } @@ -4426,7 +4426,7 @@ static int hook_uri2file(request_rec *r) /* Check that the URI is valid. */ if (!r->uri || r->uri[0] != '/') { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00668) "Invalid URI in request %s", r->the_request); return HTTP_BAD_REQUEST; } @@ -4517,7 +4517,7 @@ static int hook_uri2file(request_rec *r) * we can actually use it! */ if (!proxy_available) { - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00669) "attempt to make remote request from mod_rewrite " "without proxy enabled: %s", r->filename); return HTTP_FORBIDDEN; @@ -4739,7 +4739,7 @@ static int hook_fixup(request_rec *r) */ if (!(ap_allow_options(r) & (OPT_SYM_LINKS | OPT_SYM_OWNER))) { /* FollowSymLinks is mandatory! */ - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00670) "Options FollowSymLinks and SymLinksIfOwnerMatch are both off, " "so the RewriteRule directive is also forbidden " "due to its similar ability to circumvent directory restrictions : " |