Skip to content

Commit 273b7aa

Browse files
author
Stefan Fritsch
committed
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
1 parent 7e295ae commit 273b7aa

173 files changed

Lines changed: 2201 additions & 2185 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/log-message-tags/next-number

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1
1+
2183

modules/aaa/mod_access_compat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ static int check_dir_access(request_rec *r)
350350
}
351351

352352
if (ret == HTTP_FORBIDDEN) {
353-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
353+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01797)
354354
"client denied by server configuration: %s%s",
355355
r->filename ? "" : "uri ",
356356
r->filename ? r->filename : r->uri);

modules/aaa/mod_allowmethods.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static int am_check_access(request_rec *r)
6767
return DECLINED;
6868
}
6969

70-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
70+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01623)
7171
"client method denied by server configuration: '%s' to %s%s",
7272
r->method,
7373
r->filename ? "" : "uri ",

modules/aaa/mod_auth_basic.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static int get_basic_auth(request_rec *r, const char **user,
155155

156156
if (strcasecmp(ap_getword(r->pool, &auth_line, ' '), "Basic")) {
157157
/* Client tried to authenticate using wrong auth scheme */
158-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
158+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01614)
159159
"client used wrong authentication scheme: %s", r->uri);
160160
note_basic_auth_failure(r);
161161
return HTTP_UNAUTHORIZED;
@@ -201,7 +201,7 @@ static int authenticate_basic_user(request_rec *r)
201201
/* We need an authentication realm. */
202202
if (!ap_auth_name(r)) {
203203
ap_log_rerror(APLOG_MARK, APLOG_ERR,
204-
0, r, "need AuthName: %s", r->uri);
204+
0, r, APLOGNO(01615) "need AuthName: %s", r->uri);
205205
return HTTP_INTERNAL_SERVER_ERROR;
206206
}
207207

@@ -225,7 +225,7 @@ static int authenticate_basic_user(request_rec *r)
225225
AUTHN_PROVIDER_VERSION);
226226

227227
if (!provider || !provider->check_password) {
228-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
228+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01616)
229229
"No Authn provider configured");
230230
auth_result = AUTH_GENERAL_ERROR;
231231
break;
@@ -265,14 +265,14 @@ static int authenticate_basic_user(request_rec *r)
265265

266266
switch (auth_result) {
267267
case AUTH_DENIED:
268-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
268+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01617)
269269
"user %s: authentication failure for \"%s\": "
270270
"Password Mismatch",
271271
sent_user, r->uri);
272272
return_code = HTTP_UNAUTHORIZED;
273273
break;
274274
case AUTH_USER_NOT_FOUND:
275-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
275+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01618)
276276
"user %s not found: %s", sent_user, r->uri);
277277
return_code = HTTP_UNAUTHORIZED;
278278
break;

modules/aaa/mod_auth_digest.c

Lines changed: 40 additions & 40 deletions
Large diffs are not rendered by default.

modules/aaa/mod_auth_form.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ static int check_authn(request_rec * r, const char *sent_user, const char *sent_
742742
AUTHN_PROVIDER_VERSION);
743743

744744
if (!provider || !provider->check_password) {
745-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
745+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01806)
746746
"no authn provider configured");
747747
auth_result = AUTH_GENERAL_ERROR;
748748
break;
@@ -786,14 +786,14 @@ static int check_authn(request_rec * r, const char *sent_user, const char *sent_
786786

787787
switch (auth_result) {
788788
case AUTH_DENIED:
789-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
789+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01807)
790790
"user '%s': authentication failure for \"%s\": "
791791
"password Mismatch",
792792
sent_user, r->uri);
793793
return_code = HTTP_UNAUTHORIZED;
794794
break;
795795
case AUTH_USER_NOT_FOUND:
796-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
796+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01808)
797797
"user '%s' not found: %s", sent_user, r->uri);
798798
return_code = HTTP_UNAUTHORIZED;
799799
break;
@@ -868,15 +868,15 @@ static int authenticate_form_authn(request_rec * r)
868868
*/
869869
if (PROXYREQ_PROXY == r->proxyreq) {
870870
ap_log_rerror(APLOG_MARK, APLOG_ERR,
871-
0, r, "form auth cannot be used for proxy "
871+
0, r, APLOGNO(01809) "form auth cannot be used for proxy "
872872
"requests due to XSS risk, access denied: %s", r->uri);
873873
return HTTP_INTERNAL_SERVER_ERROR;
874874
}
875875

876876
/* We need an authentication realm. */
877877
if (!ap_auth_name(r)) {
878878
ap_log_rerror(APLOG_MARK, APLOG_ERR,
879-
0, r, "need AuthName: %s", r->uri);
879+
0, r, APLOGNO(01810) "need AuthName: %s", r->uri);
880880
return HTTP_INTERNAL_SERVER_ERROR;
881881
}
882882

@@ -1068,7 +1068,7 @@ static int authenticate_form_login_handler(request_rec * r)
10681068
}
10691069

10701070
if (r->method_number != M_POST) {
1071-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
1071+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01811)
10721072
"the " FORM_LOGIN_HANDLER " only supports the POST method for %s",
10731073
r->uri);
10741074
return HTTP_METHOD_NOT_ALLOWED;
@@ -1170,7 +1170,7 @@ static int authenticate_form_redirect_handler(request_rec * r)
11701170

11711171
if (r->kept_body && sent_method && sent_mimetype) {
11721172

1173-
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
1173+
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01812)
11741174
"internal redirect to method '%s' and body mimetype '%s' for the "
11751175
"uri: %s", sent_method, sent_mimetype, r->uri);
11761176

@@ -1179,7 +1179,7 @@ static int authenticate_form_redirect_handler(request_rec * r)
11791179

11801180
}
11811181
else {
1182-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
1182+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01813)
11831183
"internal redirect requested but one or all of method, mimetype or "
11841184
"body are NULL: %s", r->uri);
11851185
return HTTP_INTERNAL_SERVER_ERROR;

modules/aaa/mod_authn_anon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ static authn_status check_anonymous(request_rec *r, const char *user,
179179
|| (ap_strchr_c(sent_pw, '@') && ap_strchr_c(sent_pw, '.'))))
180180
{
181181
if (conf->logemail && ap_is_initial_req(r)) {
182-
ap_log_rerror(APLOG_MARK, APLOG_INFO, APR_SUCCESS, r,
182+
ap_log_rerror(APLOG_MARK, APLOG_INFO, APR_SUCCESS, r, APLOGNO(01672)
183183
"Anonymous: Passwd <%s> Accepted",
184184
sent_pw ? sent_pw : "\'none\'");
185185
}

modules/aaa/mod_authn_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ static int authenticate_no_user(request_rec *r)
351351
/* there's an AuthType configured, but no authentication module
352352
* loaded to support it
353353
*/
354-
ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r,
354+
ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r, APLOGNO(01796)
355355
"AuthType %s configured without corresponding module",
356356
ap_auth_type(r));
357357

modules/aaa/mod_authn_dbd.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,28 +105,28 @@ static authn_status authn_dbd_password(request_rec *r, const char *user,
105105
&authn_dbd_module);
106106
ap_dbd_t *dbd = authn_dbd_acquire_fn(r);
107107
if (dbd == NULL) {
108-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
108+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01653)
109109
"Failed to acquire database connection to look up "
110110
"user '%s'", user);
111111
return AUTH_GENERAL_ERROR;
112112
}
113113

114114
if (conf->user == NULL) {
115-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
115+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01654)
116116
"No AuthDBDUserPWQuery has been specified");
117117
return AUTH_GENERAL_ERROR;
118118
}
119119

120120
statement = apr_hash_get(dbd->prepared, conf->user, APR_HASH_KEY_STRING);
121121
if (statement == NULL) {
122-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
122+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01655)
123123
"A prepared statement could not be found for "
124124
"AuthDBDUserPWQuery with the key '%s'", conf->user);
125125
return AUTH_GENERAL_ERROR;
126126
}
127127
if (apr_dbd_pvselect(dbd->driver, r->pool, dbd->handle, &res, statement,
128128
0, user, NULL) != 0) {
129-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
129+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01656)
130130
"Query execution error looking up '%s' "
131131
"in database", user);
132132
return AUTH_GENERAL_ERROR;
@@ -135,7 +135,7 @@ static authn_status authn_dbd_password(request_rec *r, const char *user,
135135
rv != -1;
136136
rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1)) {
137137
if (rv != 0) {
138-
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
138+
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01657)
139139
"Error retrieving results while looking up '%s' "
140140
"in database", user);
141141
return AUTH_GENERAL_ERROR;
@@ -198,26 +198,26 @@ static authn_status authn_dbd_realm(request_rec *r, const char *user,
198198
&authn_dbd_module);
199199
ap_dbd_t *dbd = authn_dbd_acquire_fn(r);
200200
if (dbd == NULL) {
201-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
201+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01658)
202202
"Failed to acquire database connection to look up "
203203
"user '%s:%s'", user, realm);
204204
return AUTH_GENERAL_ERROR;
205205
}
206206
if (conf->realm == NULL) {
207-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
207+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01659)
208208
"No AuthDBDUserRealmQuery has been specified");
209209
return AUTH_GENERAL_ERROR;
210210
}
211211
statement = apr_hash_get(dbd->prepared, conf->realm, APR_HASH_KEY_STRING);
212212
if (statement == NULL) {
213-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
213+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01660)
214214
"A prepared statement could not be found for "
215215
"AuthDBDUserRealmQuery with the key '%s'", conf->realm);
216216
return AUTH_GENERAL_ERROR;
217217
}
218218
if (apr_dbd_pvselect(dbd->driver, r->pool, dbd->handle, &res, statement,
219219
0, user, realm, NULL) != 0) {
220-
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
220+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01661)
221221
"Query execution error looking up '%s:%s' "
222222
"in database", user, realm);
223223
return AUTH_GENERAL_ERROR;
@@ -226,7 +226,7 @@ static authn_status authn_dbd_realm(request_rec *r, const char *user,
226226
rv != -1;
227227
rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1)) {
228228
if (rv != 0) {
229-
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
229+
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01662)
230230
"Error retrieving results while looking up '%s:%s' "
231231
"in database", user, realm);
232232
return AUTH_GENERAL_ERROR;

modules/aaa/mod_authn_dbm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static authn_status check_dbm_pw(request_rec *r, const char *user,
128128
r->pool);
129129

130130
if (rv != APR_SUCCESS) {
131-
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
131+
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01754)
132132
"could not open dbm (type %s) auth file: %s",
133133
conf->dbmtype, conf->pwfile);
134134
return AUTH_GENERAL_ERROR;
@@ -167,7 +167,7 @@ static authn_status get_dbm_realm_hash(request_rec *r, const char *user,
167167
&dbm_hash, r->pool);
168168

169169
if (rv != APR_SUCCESS) {
170-
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
170+
ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01755)
171171
"Could not open dbm (type %s) hash file: %s",
172172
conf->dbmtype, conf->pwfile);
173173
return AUTH_GENERAL_ERROR;

0 commit comments

Comments
 (0)