summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Jung <rjung@apache.org>2016-01-19 01:03:18 +0100
committerRainer Jung <rjung@apache.org>2016-01-19 01:03:18 +0100
commit44ce30494ebedf4b08485cbd38a893d1635ee4c2 (patch)
tree0e39bf10dda446cb58b13a1ddf2b10eb0da1602e
parentLeverage the OPTIONS code for HEAD as well... (diff)
downloadapache2-44ce30494ebedf4b08485cbd38a893d1635ee4c2.tar.xz
apache2-44ce30494ebedf4b08485cbd38a893d1635ee4c2.zip
Added many log numbers to log statements that
had none. Handled all files in modules/. I used the coccinelle script provided by Stefan. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725392 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES2
-rw-r--r--modules/aaa/mod_auth_form.c4
-rw-r--r--modules/arch/win32/mod_isapi.c10
-rw-r--r--modules/cache/mod_cache_disk.c10
-rw-r--r--modules/core/mod_macro.c2
-rw-r--r--modules/debugging/mod_firehose.c3
-rw-r--r--modules/examples/mod_example_hooks.c3
-rw-r--r--modules/examples/mod_example_ipc.c10
-rw-r--r--modules/filters/mod_charset_lite.c2
-rw-r--r--modules/filters/mod_sed.c2
-rw-r--r--modules/http2/h2_alt_svc.c2
-rw-r--r--modules/http2/h2_conn.c2
-rw-r--r--modules/http2/h2_conn_io.c2
-rw-r--r--modules/http2/h2_filter.c2
-rw-r--r--modules/http2/h2_from_h1.c6
-rw-r--r--modules/http2/h2_h2.c10
-rw-r--r--modules/http2/h2_io.c2
-rw-r--r--modules/http2/h2_mplx.c2
-rw-r--r--modules/http2/h2_push.c1
-rw-r--r--modules/http2/h2_request.c6
-rw-r--r--modules/http2/h2_response.c3
-rw-r--r--modules/http2/h2_session.c36
-rw-r--r--modules/http2/h2_stream.c4
-rw-r--r--modules/http2/h2_switch.c12
-rw-r--r--modules/http2/mod_http2.c6
-rw-r--r--modules/loggers/mod_log_debug.c6
-rw-r--r--modules/lua/lua_request.c49
-rw-r--r--modules/lua/lua_vmprep.c2
-rw-r--r--modules/lua/mod_lua.c3
-rw-r--r--modules/proxy/mod_proxy.c8
-rw-r--r--modules/ssl/mod_ssl_ct.c46
-rw-r--r--modules/ssl/ssl_ct_log_config.c5
-rw-r--r--modules/ssl/ssl_ct_sct.c4
-rw-r--r--modules/ssl/ssl_engine_init.c3
-rw-r--r--modules/ssl/ssl_util_stapling.c2
-rw-r--r--modules/test/mod_policy.c20
36 files changed, 149 insertions, 143 deletions
diff --git a/CHANGES b/CHANGES
index d192021555..341e119c66 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) Added many log numbers to log statements that had none.
+
*) mod_http2: fixed compile issues re cc's with builtin log2n, fixed cache
digest calculation. [Stefan Eissing]
diff --git a/modules/aaa/mod_auth_form.c b/modules/aaa/mod_auth_form.c
index 3a942d4310..e254710b17 100644
--- a/modules/aaa/mod_auth_form.c
+++ b/modules/aaa/mod_auth_form.c
@@ -683,7 +683,7 @@ static int get_form_auth(request_rec * r,
/* a missing username or missing password means auth denied */
if (!sent_user || !*sent_user) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02982)
"form parsed, but username field '%s' was missing or empty, unauthorized",
username);
@@ -691,7 +691,7 @@ static int get_form_auth(request_rec * r,
}
if (!sent_pw || !*sent_pw) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02983)
"form parsed, but password field '%s' was missing or empty, unauthorized",
password);
diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c
index 66cc8da69e..275d0864ef 100644
--- a/modules/arch/win32/mod_isapi.c
+++ b/modules/arch/win32/mod_isapi.c
@@ -842,7 +842,7 @@ static int APR_THREAD_FUNC regfnWriteClient(isapi_cid *cid,
rv = ap_pass_brigade(r->output_filters, bb);
cid->response_sent = 1;
if (rv != APR_SUCCESS)
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(02984)
"WriteClient ap_pass_brigade failed: %s",
r->filename);
}
@@ -1017,7 +1017,7 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid *cid,
r->args = apr_pstrdup(r->pool, (char*) buf_data);
}
if (cid->dconf.log_to_errlog)
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02985)
"%s: %s", cid->r->filename,
(char*) buf_data);
return 1;
@@ -1187,9 +1187,9 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid *cid,
int res = 0;
if (!cid->dconf.fake_async) {
if (cid->dconf.log_unsupported)
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
- "asynchronous I/O not supported: %s",
- r->filename);
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02986)
+ "asynchronous I/O not supported: %s",
+ r->filename);
apr_set_os_error(APR_FROM_OS_ERROR(ERROR_INVALID_PARAMETER));
return 0;
}
diff --git a/modules/cache/mod_cache_disk.c b/modules/cache/mod_cache_disk.c
index 9e83fa81d3..52d5dba0b1 100644
--- a/modules/cache/mod_cache_disk.c
+++ b/modules/cache/mod_cache_disk.c
@@ -880,13 +880,15 @@ static apr_status_t recall_headers(cache_handle_t *h, request_rec *r)
/* Call routine to read the header lines/status line */
rv = read_table(h, r, h->resp_hdrs, dobj->hdrs.fd);
if (rv != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "Error reading response headers from %s for %s", dobj->hdrs.file, dobj->name);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02987)
+ "Error reading response headers from %s for %s",
+ dobj->hdrs.file, dobj->name);
}
rv = read_table(h, r, h->req_hdrs, dobj->hdrs.fd);
if (rv != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "Error reading request headers from %s for %s", dobj->hdrs.file, dobj->name);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02988)
+ "Error reading request headers from %s for %s",
+ dobj->hdrs.file, dobj->name);
}
apr_file_close(dobj->hdrs.fd);
diff --git a/modules/core/mod_macro.c b/modules/core/mod_macro.c
index ec484ac966..4cd1d41256 100644
--- a/modules/core/mod_macro.c
+++ b/modules/core/mod_macro.c
@@ -115,7 +115,7 @@ static void warn_if_non_blank(const char * what,
if (*p == '#')
break;
if (*p != ' ' && *p != '\t') {
- ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02989)
"%s on line %d of %s: %s",
what, cfg->line_number, cfg->name, ptr);
break;
diff --git a/modules/debugging/mod_firehose.c b/modules/debugging/mod_firehose.c
index a9a63303ca..d7e4ed9745 100644
--- a/modules/debugging/mod_firehose.c
+++ b/modules/debugging/mod_firehose.c
@@ -485,7 +485,8 @@ static int firehose_open_logs(apr_pool_t *p, apr_pool_t *plog,
| conn->nonblock, APR_OS_DEFAULT, plog))) {
ap_log_error(APLOG_MARK,
APLOG_WARNING,
- rv, s, "mod_firehose: could not open '%s' for write, disabling firehose %s%s %s filter",
+ rv, s, APLOGNO(02990)
+ "mod_firehose: could not open '%s' for write, disabling firehose %s%s %s filter",
conn->filename, conn->proxy == FIREHOSE_PROXY ? "proxy " : "",
conn->request == FIREHOSE_REQUEST ? " request" : "connection",
conn->direction == FIREHOSE_IN ? "input" : "output");
diff --git a/modules/examples/mod_example_hooks.c b/modules/examples/mod_example_hooks.c
index 4db0865ccc..d818dc1f73 100644
--- a/modules/examples/mod_example_hooks.c
+++ b/modules/examples/mod_example_hooks.c
@@ -328,7 +328,8 @@ static x_cfg *our_cconfig(const conn_rec *c)
static void example_log_each(apr_pool_t *p, server_rec *s, const char *note)
{
if (s != NULL) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "mod_example_hooks: %s", note);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02991)
+ "mod_example_hooks: %s", note);
}
else {
apr_file_t *out = NULL;
diff --git a/modules/examples/mod_example_ipc.c b/modules/examples/mod_example_ipc.c
index a7cdb34d1b..9685f8fc33 100644
--- a/modules/examples/mod_example_ipc.c
+++ b/modules/examples/mod_example_ipc.c
@@ -142,7 +142,7 @@ static int exipc_post_config(apr_pool_t *pconf, apr_pool_t *plog,
*/
rs = apr_temp_dir_get(&tempdir, pconf);
if (APR_SUCCESS != rs) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rs, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, rs, s, APLOGNO(02992)
"Failed to find temporary directory");
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -160,7 +160,7 @@ static int exipc_post_config(apr_pool_t *pconf, apr_pool_t *plog,
rs = apr_shm_create(&exipc_shm, sizeof(exipc_data),
(const char *) shmfilename, pconf);
if (APR_SUCCESS != rs) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rs, s,
+ ap_log_error(APLOG_MARK, APLOG_ERR, rs, s, APLOGNO(02993)
"Failed to create shared memory segment on file %s",
shmfilename);
return HTTP_INTERNAL_SERVER_ERROR;
@@ -205,7 +205,7 @@ static void exipc_child_init(apr_pool_t *p, server_rec *s)
apr_global_mutex_lockfile(exipc_mutex),
p);
if (APR_SUCCESS != rs) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, rs, s,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rs, s, APLOGNO(02994)
"Failed to reopen mutex %s in child",
exipc_mutex_type);
/* There's really nothing else we can do here, since This
@@ -265,7 +265,7 @@ static int exipc_handler(request_rec *r)
}
else {
/* Some error, log and bail */
- ap_log_error(APLOG_MARK, APLOG_ERR, rs, r->server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, rs, r->server, APLOGNO(02995)
"Child %ld failed to acquire lock",
(long int)getpid());
break; /* Out of the loop without having the lock */
@@ -273,7 +273,7 @@ static int exipc_handler(request_rec *r)
}
else {
/* Some other error, log and bail */
- ap_log_error(APLOG_MARK, APLOG_ERR, rs, r->server,
+ ap_log_error(APLOG_MARK, APLOG_ERR, rs, r->server, APLOGNO(02996)
"Child %ld failed to try and acquire lock",
(long int)getpid());
break; /* Out of the loop without having the lock */
diff --git a/modules/filters/mod_charset_lite.c b/modules/filters/mod_charset_lite.c
index e10cb6cc00..2b30050e79 100644
--- a/modules/filters/mod_charset_lite.c
+++ b/modules/filters/mod_charset_lite.c
@@ -508,7 +508,7 @@ static void log_xlate_error(ap_filter_t *f, apr_status_t rv)
default:
msg = APLOGNO(02198) "xlate filter - returning error";
}
- ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, "%s", msg);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, APLOGNO(02997) "%s", msg);
}
/* chk_filter_chain() is called once per filter instance; it tries to
diff --git a/modules/filters/mod_sed.c b/modules/filters/mod_sed.c
index 4a7e5d2fea..f788cba92e 100644
--- a/modules/filters/mod_sed.c
+++ b/modules/filters/mod_sed.c
@@ -64,7 +64,7 @@ module AP_MODULE_DECLARE_DATA sed_module;
static apr_status_t log_sed_errf(void *data, const char *error)
{
request_rec *r = (request_rec *) data;
- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "%s", error);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02998) "%s", error);
return APR_SUCCESS;
}
diff --git a/modules/http2/h2_alt_svc.c b/modules/http2/h2_alt_svc.c
index 2ccea963c1..24a8b1f41a 100644
--- a/modules/http2/h2_alt_svc.c
+++ b/modules/http2/h2_alt_svc.c
@@ -102,7 +102,7 @@ static int h2_alt_svc_handler(request_rec *r)
if (ma >= 0) {
svc_ma = apr_psprintf(r->pool, "; ma=%d", ma);
}
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03043)
"h2_alt_svc: announce %s for %s:%d",
(secure? "secure" : "insecure"),
r->hostname, (int)r->server->port);
diff --git a/modules/http2/h2_conn.c b/modules/http2/h2_conn.c
index 3e762f162b..f2cbbda074 100644
--- a/modules/http2/h2_conn.c
+++ b/modules/http2/h2_conn.c
@@ -186,7 +186,7 @@ apr_status_t h2_conn_run(struct h2_ctx *ctx, conn_rec *c)
c->cs->state = CONN_STATE_WRITE_COMPLETION;
}
if (APR_STATUS_IS_EOF(status)) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, c, APLOGNO(03045)
"h2_session(%ld): process, closing conn", c->id);
c->keepalive = AP_CONN_CLOSE;
}
diff --git a/modules/http2/h2_conn_io.c b/modules/http2/h2_conn_io.c
index 773d7bbb4b..1ac1edc666 100644
--- a/modules/http2/h2_conn_io.c
+++ b/modules/http2/h2_conn_io.c
@@ -112,7 +112,7 @@ static apr_status_t pass_out(apr_bucket_brigade *bb, void *ctx)
ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, NULL);
status = apr_brigade_length(bb, 0, &bblen);
if (status == APR_SUCCESS) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03044)
"h2_conn_io(%ld): pass_out brigade %ld bytes",
c->id, (long)bblen);
status = ap_pass_brigade(c->output_filters, bb);
diff --git a/modules/http2/h2_filter.c b/modules/http2/h2_filter.c
index aaa3601133..9bc550004b 100644
--- a/modules/http2/h2_filter.c
+++ b/modules/http2/h2_filter.c
@@ -161,7 +161,7 @@ apr_status_t h2_filter_core_input(ap_filter_t* f,
case APR_TIMEUP:
break;
default:
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, f->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, f->c, APLOGNO(03046)
"h2_conn_io: error reading");
break;
}
diff --git a/modules/http2/h2_from_h1.c b/modules/http2/h2_from_h1.c
index f2f39f307a..e9b2fe309c 100644
--- a/modules/http2/h2_from_h1.c
+++ b/modules/http2/h2_from_h1.c
@@ -519,7 +519,7 @@ apr_status_t h2_response_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
if (eb) {
int st = eb->status;
apr_brigade_cleanup(bb);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, f->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, f->c, APLOGNO(03047)
"h2_from_h1(%d): err bucket status=%d",
from_h1->stream_id, st);
ap_die(st, r);
@@ -528,7 +528,7 @@ apr_status_t h2_response_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
from_h1->response = create_response(from_h1, r);
if (from_h1->response == NULL) {
- ap_log_cerror(APLOG_MARK, APLOG_NOTICE, 0, f->c,
+ ap_log_cerror(APLOG_MARK, APLOG_NOTICE, 0, f->c, APLOGNO(03048)
"h2_from_h1(%d): unable to create response",
from_h1->stream_id);
return APR_ENOMEM;
@@ -574,7 +574,7 @@ apr_status_t h2_response_trailers_filter(ap_filter_t *f, apr_bucket_brigade *bb)
/* FIXME: need a better test case than this.
apr_table_setn(r->trailers_out, "X", "1"); */
if (r->trailers_out && !apr_is_empty_table(r->trailers_out)) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, f->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, f->c, APLOGNO(03049)
"h2_from_h1(%d): trailers filter, saving trailers",
from_h1->stream_id);
h2_response_set_trailers(from_h1->response,
diff --git a/modules/http2/h2_h2.c b/modules/http2/h2_h2.c
index 6217c83e6f..506fc9aa79 100644
--- a/modules/http2/h2_h2.c
+++ b/modules/http2/h2_h2.c
@@ -494,14 +494,14 @@ int h2_is_acceptable_connection(conn_rec *c, int require_all)
if (strncmp("TLS", val, 3)
|| !strcmp("TLSv1", val)
|| !strcmp("TLSv1.1", val)) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03050)
"h2_h2(%ld): tls protocol not suitable: %s",
(long)c->id, val);
return 0;
}
}
else if (require_all) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03051)
"h2_h2(%ld): tls protocol is indetermined", (long)c->id);
return 0;
}
@@ -512,14 +512,14 @@ int h2_is_acceptable_connection(conn_rec *c, int require_all)
if (val && *val) {
const char *source;
if (cipher_is_blacklisted(val, &source)) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03052)
"h2_h2(%ld): tls cipher %s blacklisted by %s",
(long)c->id, val, source);
return 0;
}
}
else if (require_all) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03053)
"h2_h2(%ld): tls cipher is indetermined", (long)c->id);
return 0;
}
@@ -617,7 +617,7 @@ int h2_h2_process_conn(conn_rec* c)
AP_MODE_SPECULATIVE, APR_BLOCK_READ, 24);
if (status != APR_SUCCESS) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, c, APLOGNO(03054)
"h2_h2, error reading 24 bytes speculative");
apr_brigade_destroy(temp);
return DECLINED;
diff --git a/modules/http2/h2_io.c b/modules/http2/h2_io.c
index 092a37c391..5a20a7ed0a 100644
--- a/modules/http2/h2_io.c
+++ b/modules/http2/h2_io.c
@@ -127,7 +127,7 @@ apr_status_t h2_io_signal_wait(h2_mplx *m, h2_io *io)
if (io->timeout_at != 0) {
status = apr_thread_cond_timedwait(io->timed_cond, m->lock, io->timeout_at);
if (APR_STATUS_IS_TIMEUP(status)) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, m->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, m->c, APLOGNO(03055)
"h2_mplx(%ld-%d): stream timeout expired: %s",
m->id, io->id,
(io->timed_op == H2_IO_READ)? "read" : "write");
diff --git a/modules/http2/h2_mplx.c b/modules/http2/h2_mplx.c
index 4fa0f59136..a9f305bf91 100644
--- a/modules/http2/h2_mplx.c
+++ b/modules/http2/h2_mplx.c
@@ -307,7 +307,7 @@ apr_status_t h2_mplx_release_and_join(h2_mplx *m, apr_thread_cond_t *wait)
}
}
}
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, m->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, m->c, APLOGNO(03056)
"h2_mplx(%ld): release_join -> destroy", m->id);
apr_thread_mutex_unlock(m->lock);
h2_mplx_destroy(m);
diff --git a/modules/http2/h2_push.c b/modules/http2/h2_push.c
index 52f29f3d42..fa0154b564 100644
--- a/modules/http2/h2_push.c
+++ b/modules/http2/h2_push.c
@@ -676,6 +676,7 @@ apr_array_header_t *h2_push_collect_update(h2_stream *stream,
cache_digest, stream->pool);
if (status != APR_SUCCESS) {
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c,
+ APLOGNO(03057)
"h2_session(%ld): push diary set from Cache-Digest: %s",
session->id, cache_digest);
}
diff --git a/modules/http2/h2_request.c b/modules/http2/h2_request.c
index 6fafa45f1a..5ab958b26c 100644
--- a/modules/http2/h2_request.c
+++ b/modules/http2/h2_request.c
@@ -167,7 +167,7 @@ apr_status_t h2_request_rwrite(h2_request *req, request_rec *r)
status = add_all_h1_header(req, r->pool, r->headers_in);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(03058)
"h2_request(%d): rwrite %s host=%s://%s%s",
req->id, req->method, req->scheme, req->authority, req->path);
@@ -313,13 +313,13 @@ apr_status_t h2_request_add_trailer(h2_request *req, apr_pool_t *pool,
const char *value, size_t vlen)
{
if (!req->trailers) {
- ap_log_perror(APLOG_MARK, APLOG_DEBUG, APR_EINVAL, pool,
+ ap_log_perror(APLOG_MARK, APLOG_DEBUG, APR_EINVAL, pool, APLOGNO(03059)
"h2_request(%d): unanounced trailers",
req->id);
return APR_EINVAL;
}
if (nlen == 0 || name[0] == ':') {
- ap_log_perror(APLOG_MARK, APLOG_DEBUG, APR_EINVAL, pool,
+ ap_log_perror(APLOG_MARK, APLOG_DEBUG, APR_EINVAL, pool, APLOGNO(03060)
"h2_request(%d): pseudo header in trailer",
req->id);
return APR_EINVAL;
diff --git a/modules/http2/h2_response.c b/modules/http2/h2_response.c
index 3ef6f85063..01bb20b990 100644
--- a/modules/http2/h2_response.c
+++ b/modules/http2/h2_response.c
@@ -144,7 +144,8 @@ h2_response *h2_response_rcreate(int stream_id, request_rec *r,
/* This request triggered a TLS renegotiation that is now allowed
* in HTTP/2. Tell the client that it should use HTTP/1.1 for this.
*/
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, response->http_status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, response->http_status, r,
+ APLOGNO(03061)
"h2_response(%ld-%d): renegotiate forbidden, cause: %s",
(long)r->connection->id, stream_id, cause);
response->rst_error = H2_ERR_HTTP_1_1_REQUIRED;
diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c
index 34575a6b55..1b527f4e78 100644
--- a/modules/http2/h2_session.c
+++ b/modules/http2/h2_session.c
@@ -199,7 +199,7 @@ static ssize_t send_cb(nghttp2_session *ngh2,
if (APR_STATUS_IS_EAGAIN(status)) {
return NGHTTP2_ERR_WOULDBLOCK;
}
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c, APLOGNO(03062)
"h2_session: send error");
return h2_session_status_from_apr_status(status);
}
@@ -215,7 +215,7 @@ static int on_invalid_frame_recv_cb(nghttp2_session *ngh2,
char buffer[256];
frame_print(frame, buffer, sizeof(buffer)/sizeof(buffer[0]));
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03063)
"h2_session(%ld): recv unknown FRAME[%s], frames=%ld/%ld (r/s)",
session->id, buffer, (long)session->frames_received,
(long)session->frames_sent);
@@ -240,7 +240,7 @@ static int on_data_chunk_recv_cb(nghttp2_session *ngh2, uint8_t flags,
stream = h2_session_get_stream(session, stream_id);
if (!stream) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03064)
"h2_stream(%ld-%d): on_data_chunk for unknown stream",
session->id, (int)stream_id);
rv = nghttp2_submit_rst_stream(ngh2, NGHTTP2_FLAG_NONE, stream_id,
@@ -279,7 +279,7 @@ static apr_status_t stream_release(h2_session *session,
}
}
else {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03065)
"h2_stream(%ld-%d): closing with err=%d %s",
session->id, (int)stream->id, (int)error_code,
h2_h2_err_description(error_code));
@@ -376,7 +376,7 @@ static int on_frame_recv_cb(nghttp2_session *ng2s,
char buffer[256];
frame_print(frame, buffer, sizeof(buffer)/sizeof(buffer[0]));
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03066)
"h2_session(%ld): recv FRAME[%s], frames=%ld/%ld (r/s)",
session->id, buffer, (long)session->frames_received,
(long)session->frames_sent);
@@ -445,7 +445,7 @@ static int on_frame_recv_cb(nghttp2_session *ng2s,
frame->window_update.window_size_increment);
break;
case NGHTTP2_RST_STREAM:
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03067)
"h2_session(%ld-%d): RST_STREAM by client, errror=%d",
session->id, (int)frame->hd.stream_id,
(int)frame->rst_stream.error_code);
@@ -606,7 +606,7 @@ static int on_frame_send_cb(nghttp2_session *ngh2,
char buffer[256];
frame_print(frame, buffer, sizeof(buffer)/sizeof(buffer[0]));
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03068)
"h2_session(%ld): sent FRAME[%s], frames=%ld/%ld (r/s)",
session->id, buffer, (long)session->frames_received,
(long)session->frames_sent);
@@ -702,7 +702,7 @@ static apr_status_t h2_session_shutdown(h2_session *session, int reason, const c
reason, (uint8_t*)err, err? strlen(err):0);
status = nghttp2_session_send(session->ngh2);
h2_conn_io_flush(&session->io);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03069)
"session(%ld): sent GOAWAY, err=%d, msg=%s",
session->id, reason, err? err : "");
dispatch_event(session, H2_SESSION_EV_LOCAL_GOAWAY, reason, err);
@@ -955,7 +955,7 @@ static apr_status_t h2_session_start(h2_session *session, int *rv)
if (APLOGrdebug(session->r)) {
char buffer[128];
h2_util_hex_dump(buffer, 128, (char*)cs, dlen);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, session->r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, session->r, APLOGNO(03070)
"upgrading h2c session with HTTP2-Settings: %s -> %s (%d)",
s, buffer, (int)dlen);
}
@@ -1145,7 +1145,7 @@ static ssize_t stream_data_cb(nghttp2_session *ng2s,
*/
nread = 0;
h2_stream_set_suspended(stream, 1);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03071)
"h2_stream(%ld-%d): suspending",
session->id, (int)stream_id);
return NGHTTP2_ERR_DEFERRED;
@@ -1170,7 +1170,7 @@ static ssize_t stream_data_cb(nghttp2_session *ng2s,
int rv;
nh = h2_util_ngheader_make(stream->pool, trailers);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03072)
"h2_stream(%ld-%d): submit %d trailers",
session->id, (int)stream_id,(int) nh->nvlen);
rv = nghttp2_submit_trailer(ng2s, stream->id, nh->nv, nh->nvlen);
@@ -1218,7 +1218,7 @@ static apr_status_t submit_response(h2_session *session, h2_stream *stream)
provider.source.fd = stream->id;
provider.read_callback = stream_data_cb;
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03073)
"h2_stream(%ld-%d): submit response %d",
session->id, stream->id, response->http_status);
@@ -1258,7 +1258,7 @@ static apr_status_t submit_response(h2_session *session, h2_stream *stream)
else {
int err = H2_STREAM_RST(stream, H2_ERR_PROTOCOL_ERROR);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03074)
"h2_stream(%ld-%d): RST_STREAM, err=%d",
session->id, stream->id, err);
@@ -1297,14 +1297,14 @@ struct h2_stream *h2_session_push(h2_session *session, h2_stream *is,
nid = nghttp2_submit_push_promise(session->ngh2, 0, is->id,
ngh->nv, ngh->nvlen, NULL);
if (nid <= 0) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03075)
"h2_stream(%ld-%d): submitting push promise fail: %s",
session->id, is->id, nghttp2_strerror(nid));
return NULL;
}
++session->pushes_promised;
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03076)
"h2_stream(%ld-%d): SERVER_PUSH %d for %s %s on %d",
session->id, is->id, nid,
push->req->method, push->req->path, is->id);
@@ -1323,7 +1323,7 @@ struct h2_stream *h2_session_push(h2_session *session, h2_stream *is,
++session->unsent_promises;
}
else {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03077)
"h2_stream(%ld-%d): failed to create stream obj %d",
session->id, is->id, nid);
}
@@ -1718,7 +1718,7 @@ static int is_accepting_streams(h2_session *session)
static void transit(h2_session *session, const char *action, h2_session_state nstate)
{
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03078)
"h2_session(%ld): transit [%s] -- %s --> [%s]", session->id,
state_name(session->state), action, state_name(nstate));
session->state = nstate;
@@ -1974,6 +1974,7 @@ apr_status_t h2_session_process(h2_session *session, int async)
ap_update_child_status(c->sbh, SERVER_BUSY_READ, NULL);
status = h2_session_start(session, &rv);
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, c,
+ APLOGNO(03079)
"h2_session(%ld): started on %s:%d", session->id,
session->s->server_hostname,
c->local_addr->port);
@@ -2100,6 +2101,7 @@ apr_status_t h2_session_process(h2_session *session, int async)
default:
ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, c,
+ APLOGNO(03080)
"h2_session(%ld): unknown state %d", session->id, session->state);
dispatch_event(session, H2_SESSION_EV_PROTO_ERROR, 0, NULL);
break;
diff --git a/modules/http2/h2_stream.c b/modules/http2/h2_stream.c
index 0a5af7eb3b..fa1ebaeacd 100644
--- a/modules/http2/h2_stream.c
+++ b/modules/http2/h2_stream.c
@@ -67,7 +67,7 @@ static int set_state(h2_stream *stream, h2_stream_state_t state)
return 1;
}
- ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, stream->session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, stream->session->c, APLOGNO(03081)
"h2_stream(%ld-%d): invalid state transition from %d to %d",
stream->session->id, stream->id, stream->state, state);
return 0;
@@ -160,7 +160,7 @@ h2_stream *h2_stream_open(int id, apr_pool_t *pool, h2_session *session)
set_state(stream, H2_STREAM_ST_OPEN);
stream->request = h2_request_create(id, pool, session->config);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03082)
"h2_stream(%ld-%d): opened", session->id, stream->id);
return stream;
}
diff --git a/modules/http2/h2_switch.c b/modules/http2/h2_switch.c
index c08dd9e5fd..d1d4a60f5d 100644
--- a/modules/http2/h2_switch.c
+++ b/modules/http2/h2_switch.c
@@ -58,13 +58,13 @@ static int h2_protocol_propose(conn_rec *c, request_rec *r,
if (strcmp(AP_PROTOCOL_HTTP1, ap_get_protocol(c))) {
/* We do not know how to switch from anything else but http/1.1.
*/
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03083)
"protocol switch: current proto != http/1.1, declined");
return DECLINED;
}
if (!h2_is_acceptable_connection(c, 0)) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03084)
"protocol propose: connection requirements not met");
return DECLINED;
}
@@ -82,14 +82,14 @@ static int h2_protocol_propose(conn_rec *c, request_rec *r,
p = apr_table_get(r->headers_in, "HTTP2-Settings");
if (!p) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03085)
"upgrade without HTTP2-Settings declined");
return DECLINED;
}
p = apr_table_get(r->headers_in, "Connection");
if (!ap_find_token(r->pool, p, "http2-settings")) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03086)
"upgrade without HTTP2-Settings declined");
return DECLINED;
}
@@ -98,7 +98,7 @@ static int h2_protocol_propose(conn_rec *c, request_rec *r,
*/
p = apr_table_get(r->headers_in, "Content-Length");
if (p && strcmp(p, "0")) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03087)
"upgrade with content-length: %s, declined", p);
return DECLINED;
}
@@ -158,7 +158,7 @@ static int h2_protocol_switch(conn_rec *c, request_rec *r, server_rec *s,
h2_ctx_server_set(ctx, r->server);
status = h2_conn_setup(ctx, r->connection, r);
if (status != APR_SUCCESS) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(03088)
"session setup");
return status;
}
diff --git a/modules/http2/mod_http2.c b/modules/http2/mod_http2.c
index a44661c923..41cde35f86 100644
--- a/modules/http2/mod_http2.c
+++ b/modules/http2/mod_http2.c
@@ -78,7 +78,7 @@ static int h2_post_config(apr_pool_t *p, apr_pool_t *plog,
apr_pool_userdata_get(&data, mod_h2_init_key, s->process->pool);
if ( data == NULL ) {
- ap_log_error( APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error( APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03089)
"initializing post config dry run");
apr_pool_userdata_set((const void *)1, mod_h2_init_key,
apr_pool_cleanup_null, s->process->pool);
@@ -86,7 +86,7 @@ static int h2_post_config(apr_pool_t *p, apr_pool_t *plog,
}
ngh2 = nghttp2_version(0);
- ap_log_error( APLOG_MARK, APLOG_INFO, 0, s,
+ ap_log_error( APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(03090)
"mod_http2 (v%s, nghttp2 %s), initializing...",
MOD_HTTP2_VERSION, ngh2? ngh2->version_str : "unknown");
@@ -100,7 +100,7 @@ static int h2_post_config(apr_pool_t *p, apr_pool_t *plog,
break;
case H2_MPM_UNKNOWN:
/* ??? */
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03091)
"post_config: mpm type unknown");
break;
}
diff --git a/modules/loggers/mod_log_debug.c b/modules/loggers/mod_log_debug.c
index 9111b11965..45ba6edc9f 100644
--- a/modules/loggers/mod_log_debug.c
+++ b/modules/loggers/mod_log_debug.c
@@ -79,11 +79,13 @@ static void do_debug_log(request_rec *r, const char *hookname)
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00641)
"Can't evaluate message expression: %s", err);
if (APLOGrdebug(r))
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "%s (%s hook, %s:%d)",
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02999)
+ "%s (%s hook, %s:%d)",
msg, hookname, entry->msg_expr->filename,
entry->msg_expr->line_number);
else
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "%s", msg);
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03000)
+ "%s", msg);
}
}
diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c
index 0ffeca049a..bf66fc4110 100644
--- a/modules/lua/lua_request.c
+++ b/modules/lua/lua_request.c
@@ -56,52 +56,53 @@ void ap_lua_rstack_dump(lua_State *L, request_rec *r, const char *msg)
int t = lua_type(L, i);
switch (t) {
case LUA_TSTRING:{
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03001)
"%d: '%s'", i, lua_tostring(L, i));
break;
}
case LUA_TUSERDATA:{
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "%d: userdata",
- i);
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03002)
+ "%d: userdata", i);
break;
}
case LUA_TLIGHTUSERDATA:{
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03003)
"%d: lightuserdata", i);
break;
}
case LUA_TNIL:{
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "%d: NIL", i);
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03004)
+ "%d: NIL", i);
break;
}
case LUA_TNONE:{
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "%d: None", i);
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03005)
+ "%d: None", i);
break;
}
case LUA_TBOOLEAN:{
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
- "%d: %s", i, lua_toboolean(L,
- i) ? "true" :
- "false");
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03006)
+ "%d: %s", i,
+ lua_toboolean(L, i) ? "true" : "false");
break;
}
case LUA_TNUMBER:{
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03007)
"%d: %g", i, lua_tonumber(L, i));
break;
}
case LUA_TTABLE:{
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03008)
"%d: <table>", i);
break;
}
case LUA_TFUNCTION:{
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03009)
"%d: <function>", i);
break;
}
default:{
- ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03010)
"%d: unknown: -[%s]-", i, lua_typename(L, i));
break;
}
@@ -2145,8 +2146,8 @@ static int lua_websocket_greet(lua_State *L)
request_rec *r = ap_lua_check_request_rec(L, 1);
key = apr_table_get(r->headers_in, "Sec-WebSocket-Key");
if (key != NULL) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "Websocket: Got websocket key: %s", key);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03011)
+ "Websocket: Got websocket key: %s", key);
key = apr_pstrcat(r->pool, key, "258EAFA5-E914-47DA-95CA-C5AB0DC85B11",
NULL);
apr_sha1_init(&sha1);
@@ -2168,7 +2169,7 @@ static int lua_websocket_greet(lua_State *L)
r->bytes_sent = 0;
r->read_chunked = 0;
ap_rflush(r);
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03012)
"Websocket: Upgraded from HTTP to Websocket");
lua_pushboolean(L, 1);
return 1;
@@ -2404,8 +2405,8 @@ static int lua_websocket_write(lua_State *L)
string = lua_tolstring(L, 2, &len);
if (raw != 1) {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "Websocket: Writing framed message to client");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03013)
+ "Websocket: Writing framed message to client");
prelude = 0x81; /* text frame, FIN */
ap_rputc(prelude, r);
@@ -2426,8 +2427,8 @@ static int lua_websocket_write(lua_State *L)
}
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "Websocket: Writing raw message to client");
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03014)
+ "Websocket: Writing raw message to client");
}
ap_rwrite(string, len, r);
rv = ap_rflush(r);
@@ -2486,8 +2487,8 @@ static int lua_websocket_ping(lua_State *L)
unsigned char mask = len >> 7;
if (mask) len -= 128;
plen = len;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "Websocket: Got PONG opcode: %x", opcode);
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03015)
+ "Websocket: Got PONG opcode: %x", opcode);
if (opcode == 0x8A) {
lua_pushboolean(L, 1);
}
@@ -2496,7 +2497,7 @@ static int lua_websocket_ping(lua_State *L)
}
if (plen > 0) {
ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
- "Websocket: Reading %" APR_SIZE_T_FMT " bytes of PONG", plen);
+ "Websocket: Reading %" APR_SIZE_T_FMT " bytes of PONG", plen);
return 1;
}
if (mask) {
diff --git a/modules/lua/lua_vmprep.c b/modules/lua/lua_vmprep.c
index 6cfb31658f..311fab8128 100644
--- a/modules/lua/lua_vmprep.c
+++ b/modules/lua/lua_vmprep.c
@@ -49,7 +49,7 @@ void ap_lua_init_mutex(apr_pool_t *pool, server_rec *s)
apr_global_mutex_lockfile(lua_ivm_mutex),
pool);
if (rv != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
+ ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(03016)
"mod_lua: Failed to reopen mutex lua-ivm-shm in child");
exit(1); /* bah :( */
}
diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c
index 142dc5c15f..6eede233c6 100644
--- a/modules/lua/mod_lua.c
+++ b/modules/lua/mod_lua.c
@@ -726,7 +726,8 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap
hook_spec->file_name, hook_spec->function_name, name, rc);
}
else {
- ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, "Lua hook %s:%s for phase %s did not return a numeric value",
+ ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(03017)
+ "Lua hook %s:%s for phase %s did not return a numeric value",
hook_spec->file_name, hook_spec->function_name, name);
return HTTP_INTERNAL_SERVER_ERROR;
}
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index 816ab4caaa..4247aba593 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -1967,23 +1967,23 @@ static const char *
if (ap_proxy_is_ipaddr(New, parms->pool)) {
#if DEBUGGING
- ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(03018)
"Parsed addr %s", inet_ntoa(New->addr));
- ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(03019)
"Parsed mask %s", inet_ntoa(New->mask));
#endif
}
else if (ap_proxy_is_domainname(New, parms->pool)) {
ap_str_tolower(New->name);
#if DEBUGGING
- ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(03020)
"Parsed domain %s", New->name);
#endif
}
else if (ap_proxy_is_hostname(New, parms->pool)) {
ap_str_tolower(New->name);
#if DEBUGGING
- ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
+ ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(03021)
"Parsed host %s", New->name);
#endif
}
diff --git a/modules/ssl/mod_ssl_ct.c b/modules/ssl/mod_ssl_ct.c
index 2236826ab6..5126de71b4 100644
--- a/modules/ssl/mod_ssl_ct.c
+++ b/modules/ssl/mod_ssl_ct.c
@@ -348,7 +348,7 @@ static apr_status_t collate_scts(server_rec *s, apr_pool_t *p,
cur_sct_file = elts[i];
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03022)
"Adding SCT from file %s", cur_sct_file);
rv = ctutil_read_file(p, s, cur_sct_file, MAX_SCTS_SIZE, &scts,
@@ -540,16 +540,13 @@ static apr_status_t fetch_sct(server_rec *s, apr_pool_t *p,
rv = apr_stat(&finfo, sct_fn, APR_FINFO_MTIME, p);
if (rv == APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
- "Found SCT for %s in %s",
- cert_file, sct_fn);
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03023)
+ "Found SCT for %s in %s", cert_file, sct_fn);
if (finfo.mtime + max_sct_age < apr_time_now()) {
- ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
- APLOGNO(02692) "SCT for %s is older than %d seconds, "
- "must refresh",
- cert_file,
- (int)(apr_time_sec(max_sct_age)));
+ ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(02692)
+ "SCT for %s is older than %d seconds, must refresh",
+ cert_file, (int)(apr_time_sec(max_sct_age)));
}
else {
return APR_SUCCESS;
@@ -559,8 +556,8 @@ static apr_status_t fetch_sct(server_rec *s, apr_pool_t *p,
ap_log_error(APLOG_MARK, APLOG_INFO,
/* no need to print error string for file-not-found err */
APR_STATUS_IS_ENOENT(rv) ? 0 : rv,
- s,
- APLOGNO(02693) "Did not find SCT for %s in %s, must fetch",
+ s, APLOGNO(02693)
+ "Did not find SCT for %s in %s, must fetch",
cert_file, sct_fn);
}
@@ -739,7 +736,7 @@ static apr_status_t update_log_list_for_cert(server_rec *s, apr_pool_t *p,
for (i = 0; i < arr->nelts; i++) {
const char *cur_sct_file = elts[i];
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03024)
"Removing %s", cur_sct_file);
rv = apr_file_remove(cur_sct_file, p);
@@ -885,7 +882,7 @@ static void sct_daemon_cycle(ct_server_config *sconf, server_rec *s_main,
apr_status_t rv;
if (sconf->db_log_config) { /* not using static config */
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s_main,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s_main, APLOGNO(03025)
"%s - reloading config", daemon_name);
apr_pool_clear(sconf->db_log_config_pool);
active_log_config = NULL;
@@ -903,7 +900,7 @@ static void sct_daemon_cycle(ct_server_config *sconf, server_rec *s_main,
}
active_log_config = sconf->db_log_config;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s_main,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s_main, APLOGNO(03026)
"%s - refreshing SCTs as needed", daemon_name);
rv = refresh_all_scts(s_main, ptemp, active_log_config);
if (rv != APR_SUCCESS) {
@@ -1393,8 +1390,8 @@ static int ssl_ct_check_config(apr_pool_t *pconf, apr_pool_t *plog,
APLOGNO(02720) "Log config file %s cannot be read",
sconf->log_config_fname);
if (msg) {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, s_main,
- "%s", msg);
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, s_main, APLOGNO(03027)
+ "%s", msg);
}
return HTTP_INTERNAL_SERVER_ERROR;
}
@@ -1740,7 +1737,7 @@ static apr_status_t validate_server_data(apr_pool_t *p, conn_rec *c,
ct_sct_data sct;
sct_fields_t fields;
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03028)
"%d SCTs received total", conncfg->all_scts->nelts);
verification_failures = verification_successes = unknown_log_ids = 0;
@@ -1961,7 +1958,7 @@ static int ocsp_resp_cb(SSL *ssl, void *arg)
br = OCSP_response_get1_basic(rsp); /* UNDOC */
if (!br) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03029)
"no OCSP basic response");
return 0;
}
@@ -2079,7 +2076,7 @@ static int ssl_ct_ssl_proxy_verify(server_rec *s, conn_rec *c,
return OK;
}
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03030)
"ssl_ct_ssl_proxy_verify() - get server certificate info");
if (chain_size < 1) {
@@ -2172,7 +2169,7 @@ static int ssl_ct_proxy_post_handshake(conn_rec *c, SSL *ssl)
key = gen_key(c, conncfg->certs, conncfg);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03031)
"key for server data: %s", key);
ctutil_thread_mutex_lock(cached_server_data_mutex);
@@ -2294,7 +2291,7 @@ static int server_extension_add_callback(SSL *ssl, unsigned ext_type,
/* Hmmm... Is this actually called if the client doesn't include
* the extension in the ClientHello? I don't think so.
*/
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03032)
"server_extension_callback_2: client isn't CT-aware");
/* Skip this extension for ServerHello */
return -1;
@@ -2351,7 +2348,8 @@ static int ssl_ct_pre_handshake(conn_rec *c, SSL *ssl, int is_proxy)
conncfg->client_handshake = 1;
}
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, "client connected (pre-handshake)");
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03033)
+ "client connected (pre-handshake)");
SSL_set_tlsext_status_type(ssl, TLSEXT_STATUSTYPE_ocsp); /* UNDOC */
@@ -2674,7 +2672,7 @@ static int ssl_ct_detach_backend(request_rec *r,
ct_conn_config *conncfg = get_conn_config(origin);
char *list, *last;
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03034)
"ssl_ct_detach_backend, %d%d%d",
conncfg->server_cert_has_sct_list,
conncfg->serverhello_has_sct_list,
@@ -2702,7 +2700,7 @@ static int ssl_ct_detach_backend(request_rec *r,
}
else {
/* why here? some odd error path? */
- ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+ ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03035)
"No backend connection available in ssl_ct_detach_backend()");
}
diff --git a/modules/ssl/ssl_ct_log_config.c b/modules/ssl/ssl_ct_log_config.c
index 27b4d45827..86f04563e1 100644
--- a/modules/ssl/ssl_ct_log_config.c
+++ b/modules/ssl/ssl_ct_log_config.c
@@ -372,8 +372,9 @@ apr_status_t read_config_db(apr_pool_t *p, server_rec *s_main,
const char *max_timestamp = apr_dbd_get_entry(driver, row, cur++);
const char *url = apr_dbd_get_entry(driver, row, cur++);
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s_main,
- "Log config: Record %s, log id %s, public key file %s, distrusted %s, URL %s, time %s->%s",
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s_main, APLOGNO(03036)
+ "Log config: Record %s, log id %s, public key file %s,"
+ " distrusted %s, URL %s, time %s->%s",
id,
log_id ? log_id : "(unset)",
public_key ? public_key : "(unset)",
diff --git a/modules/ssl/ssl_ct_sct.c b/modules/ssl/ssl_ct_sct.c
index 89bbb6b8ef..78065db67d 100644
--- a/modules/ssl/ssl_ct_sct.c
+++ b/modules/ssl/ssl_ct_sct.c
@@ -77,7 +77,7 @@ apr_status_t sct_verify_signature(conn_rec *c, sct_fields_t *sctf,
APLOGNO(02767) "verify_signature failed");
}
else {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03037)
"verify_signature succeeded");
}
return rv;
@@ -266,7 +266,7 @@ apr_status_t sct_parse(const char *source,
}
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03038)
"SCT from %s: version %d timestamp %s hash alg %d sig alg %d",
source, fields->version, fields->timestr,
fields->hash_alg, fields->sig_alg);
diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
index 0cd2793a63..226c706a6b 100644
--- a/modules/ssl/ssl_engine_init.c
+++ b/modules/ssl/ssl_engine_init.c
@@ -1462,7 +1462,8 @@ static apr_status_t ssl_init_proxy_certs(server_rec *s,
int j;
for (j = 0; j < i; j++) {
ssl_log_xerror(SSLLOG_MARK, APLOG_DEBUG, 0, ptemp, s,
- sk_X509_value(chain, j), "%i:", j);
+ sk_X509_value(chain, j), APLOGNO(03039)
+ "%i:", j);
}
}
}
diff --git a/modules/ssl/ssl_util_stapling.c b/modules/ssl/ssl_util_stapling.c
index 67caade31c..779c3e3b63 100644
--- a/modules/ssl/ssl_util_stapling.c
+++ b/modules/ssl/ssl_util_stapling.c
@@ -797,7 +797,7 @@ static int stapling_cb(SSL *ssl, void *arg)
stapling_refresh_mutex_off(s);
if (rv == TRUE) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03040)
"stapling_cb: success renewing response");
}
else {
diff --git a/modules/test/mod_policy.c b/modules/test/mod_policy.c
index 18c0e74a6d..775f937231 100644
--- a/modules/test/mod_policy.c
+++ b/modules/test/mod_policy.c
@@ -140,26 +140,18 @@ static void handle_policy(request_rec *r, policy_result result,
switch (result) {
case policy_log: {
- ap_log_rerror(
- APLOG_MARK,
- APLOG_WARNING,
- 0,
- r,
- "mod_policy: violation: %s, uri: %s",
- message, r->uri);
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(03041)
+ "mod_policy: violation: %s, uri: %s",
+ message, r->uri);
apr_table_addn(r->headers_out, "Warning", apr_psprintf(r->pool,
"299 %s \"%s\"", ap_get_server_name(r), message));
break;
}
case policy_enforce: {
- ap_log_rerror(
- APLOG_MARK,
- APLOG_ERR,
- 0,
- r,
- "mod_policy: violation, rejecting request: %s, uri: %s",
- message, r->uri);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(03042)
+ "mod_policy: violation, rejecting request: %s, uri: %s",
+ message, r->uri);
apr_table_addn(r->err_headers_out, "Warning", apr_psprintf(r->pool,
"299 %s \"Rejected: %s\"", ap_get_server_name(r), message));
apr_table_setn(r->notes, "error-notes",