maxw = minw;
}
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s,
"h2_workers: min=%d max=%d, mthrpchild=%d",
minw, maxw, max_threads_per_child);
*/
if (AP_BUCKET_IS_EOC(b)) {
ap_remove_output_filter(f);
- ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, f->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, f->c,
"h2_from_h1(%d): eoc bucket passed",
from_h1->stream_id);
return ap_pass_brigade(f->next, bb);
from_h1->response = create_response(from_h1, r);
if (from_h1->response == NULL) {
- ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, f->c,
+ ap_log_cerror(APLOG_MARK, APLOG_NOTICE, 0, f->c,
"h2_from_h1(%d): unable to create response",
from_h1->stream_id);
return APR_ENOMEM;
apr_status_t h2_h2_init(apr_pool_t *pool, server_rec *s)
{
(void)pool;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "h2_h2, child_init");
+ ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, s, "h2_h2, child_init");
opt_ssl_engine_disable = APR_RETRIEVE_OPTIONAL_FN(ssl_engine_disable);
opt_ssl_is_https = APR_RETRIEVE_OPTIONAL_FN(ssl_is_https);
opt_ssl_var_lookup = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);
static void h2_mplx_destroy(h2_mplx *m)
{
AP_DEBUG_ASSERT(m);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, m->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,
"h2_mplx(%ld): destroy, refs=%d",
m->id, m->refs);
m->aborted = 1;
release(m, 0);
while (m->refs > 0) {
m->join_wait = wait;
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, m->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,
"h2_mplx(%ld): release_join, refs=%d, waiting...",
m->id, m->refs);
apr_thread_cond_wait(wait, m->lock);
}
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, m->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,
"h2_mplx(%ld): release_join -> destroy, (#ios=%ld)",
m->id, (long)h2_io_set_size(m->stream_ios));
apr_thread_mutex_unlock(m->lock);
* reset by the client. Should no longer happen since such
* streams should clear io's from the ready queue.
*/
- ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, m->c, APLOGNO(02953)
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,
"h2_mplx(%ld): stream for response %d closed, "
"resetting io to close request processing",
m->id, io->id);
h2_io *io = h2_io_set_get(m->stream_ios, stream_id);
if (io && !io->orphaned) {
status = out_write(m, io, f, bb, trailers, iowait);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, m->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, m->c,
"h2_mplx(%ld-%d): write with trailers=%s",
m->id, io->id, trailers? "yes" : "no");
H2_MPLX_IO_OUT(APLOG_TRACE2, m, io, "h2_mplx_out_write");
h2_response *r = h2_response_die(stream_id, APR_EGENERAL,
io->request, m->pool);
status = out_open(m, stream_id, r, NULL, NULL, NULL);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, m->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, m->c,
"h2_mplx(%ld-%d): close, no response, no rst",
m->id, io->id);
}
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, m->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, m->c,
"h2_mplx(%ld-%d): close with trailers=%s",
m->id, io->id, trailers? "yes" : "no");
status = h2_io_out_close(io, trailers);
{
h2_session *session = (h2_session*)ctx;
nghttp2_session_consume(session->ngh2, stream_id, bytes_read);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c,
"h2_session(%ld-%d): consumed %ld bytes",
session->id, stream_id, (long)bytes_read);
}
stream = h2_session_get_stream(session, stream_id);
if (!stream) {
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
- "h2_session: stream(%ld-%d): on_data_chunk for unknown stream",
+ "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,
NGHTTP2_INTERNAL_ERROR);
uint32_t error_code)
{
if (!error_code) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
"h2_stream(%ld-%d): handled, closing",
session->id, (int)stream->id);
if (stream->id > session->max_stream_handled) {
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
- ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c,
- "h2_stream(%ld-%d): on_frame_rcv #%ld, type=%d",
- session->id, frame->hd.stream_id,
- (long)session->frames_received, frame->hd.type);
+ if (APLOGcdebug(session->c)) {
+ char buffer[256];
+
+ frame_print(frame, buffer, sizeof(buffer)/sizeof(buffer[0]));
+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ "h2_session(%ld): recv FRAME[%s], frames=%ld/%ld (r/s)",
+ session->id, buffer, (long)session->frames_received,
+ (long)session->frames_sent);
+ }
++session->frames_received;
switch (frame->hd.type) {
frame_print(frame, buffer, sizeof(buffer)/sizeof(buffer[0]));
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
- "h2_session(%ld): send %s, frames=%ld/%ld (r/s)",
+ "h2_session(%ld): sent FRAME[%s], frames=%ld/%ld (r/s)",
session->id, buffer, (long)session->frames_received,
(long)session->frames_sent);
}
const char *err = nghttp2_strerror(reason);
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
- "session(%ld): aborting session, reason=%d %s",
+ "session(%ld): abort, reason=%d %s",
session->id, reason, err);
/* The connection might still be there and we shut down
ap_log_cerror(APLOG_MARK, nghttp2_is_fatal(rv)?
APLOG_ERR : APLOG_DEBUG, 0, session->c,
APLOGNO(02936)
- "h2_stream(%ld-%d): resuming stream %s",
- session->id, stream->id, nghttp2_strerror(rv));
+ "h2_stream(%ld-%d): resuming %s",
+ session->id, stream->id, rv? nghttp2_strerror(rv) : "");
}
}
return 1;
if (!session->aborted) {
h2_session_abort_int(session, 0);
}
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0,session->c,
- "h2_session: closing, writing eoc");
-
h2_session_cleanup(session);
return h2_conn_io_close(&session->io, session);
}
nread = 0;
h2_stream_set_suspended(stream, 1);
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
- "h2_stream(%ld-%d): suspending stream",
+ "h2_stream(%ld-%d): suspending",
session->id, (int)stream_id);
return NGHTTP2_ERR_DEFERRED;
h2_stream_set_h2_request(stream, is->id, push->req);
status = stream_schedule(session, stream, 1);
if (status != APR_SUCCESS) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, session->c,
"h2_stream(%ld-%d): scheduling push stream",
session->id, stream->id);
h2_stream_cleanup(stream);
s = nghttp2_session_find_stream(session->ngh2, stream->id);
if (!s) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
"h2_stream(%ld-%d): lookup of nghttp2_stream failed",
session->id, stream->id);
return APR_EINVAL;
rv = nghttp2_session_change_stream_priority(session->ngh2, id_parent, &ps);
if (rv < 0) {
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
- "h2_stream(%ld-%d): PUSH BEFORE2, weight=%d, "
+ "h2_stream(%ld-%d): PUSH BEFORE, weight=%d, "
"depends=%d, returned=%d",
session->id, id_parent, ps.weight, ps.stream_id, rv);
return APR_EGENERAL;
}
default:
return apr_snprintf(buffer, maxlen,
- "FRAME[type=%d, length=%d, flags=%d, stream=%d]",
+ "type=%d[length=%d, flags=%d, stream=%d]",
frame->hd.type, (int)frame->hd.length,
frame->hd.flags, frame->hd.stream_id);
}
{
int rv = nghttp2_session_send(session->ngh2);
if (rv != 0) {
- ap_log_cerror( APLOG_MARK, APLOG_DEBUG, 0, session->c,
- "h2_session: send: %s", nghttp2_strerror(rv));
if (nghttp2_is_fatal(rv)) {
+ ap_log_cerror( APLOG_MARK, APLOG_DEBUG, 0, session->c,
+ "h2_session: send gave error=%s", nghttp2_strerror(rv));
h2_session_abort_int(session, rv);
return APR_EGENERAL;
}
if (n < 0) {
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, APR_EGENERAL,
session->c,
- "h2_session: nghttp2_session_mem_recv error %d",
+ "h2_session: nghttp2_session_mem_recv error=%d",
(int)n);
if (nghttp2_is_fatal((int)n)) {
h2_session_abort(session, 0, (int)n);
|| APR_STATUS_IS_ECONNABORTED(status)
|| APR_STATUS_IS_ECONNRESET(status)
|| APR_STATUS_IS_EOF(status)
+ || APR_STATUS_IS_TIMEUP(status)
|| APR_STATUS_IS_EBADF(status)) {
/* common status for a client that has left */
- ap_log_cerror( APLOG_MARK, APLOG_DEBUG, status, session->c,
+ ap_log_cerror( APLOG_MARK, APLOG_TRACE1, status, session->c,
"h2_session(%ld): terminating",
session->id);
/* Stolen from mod_reqtimeout to speed up lingering when
if (session->aborted || (!nghttp2_session_want_read(session->ngh2)
&& !nghttp2_session_want_write(session->ngh2))) {
- ap_log_cerror( APLOG_MARK, APLOG_DEBUG, status, session->c,
+ ap_log_cerror( APLOG_MARK, APLOG_TRACE1, status, session->c,
"h2_session(%ld): process -> aborted", session->id);
h2_conn_io_flush(&session->io);
return APR_EOF;
status = h2_session_start(session, &rv);
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c,
- "h2_session(%ld): starting on %s:%d", session->id,
+ "h2_session(%ld): started on %s:%d", session->id,
session->s->server_hostname,
session->c->local_addr->port);
if (status != APR_SUCCESS) {
session->id);
}
}
- ap_log_cerror( APLOG_MARK, APLOG_DEBUG, status, session->c,
+ ap_log_cerror( APLOG_MARK, APLOG_TRACE1, status, session->c,
"h2_session(%ld): timeout", session->id);
return status;
}
stream->rst_error = error_code;
close_input(stream);
close_output(stream);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, stream->session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
"h2_stream(%ld-%d): reset, error=%d",
stream->session->id, stream->id, error_code);
}
{
apr_status_t status = APR_SUCCESS;
if (!output_open(stream)) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, stream->session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
"h2_stream(%ld-%d): output closed",
stream->session->id, stream->id);
return APR_ECONNRESET;
H2_STREAM_OUT(APLOG_TRACE2, stream, "h2_stream set_response_post");
}
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, stream->session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, stream->session->c,
"h2_stream(%ld-%d): set_response(%d)",
stream->session->id, stream->id, response->http_status);
return status;
stream->request, eos, cmp, ctx);
stream->scheduled = 1;
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, stream->session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
"h2_stream(%ld-%d): scheduled %s %s://%s%s",
stream->session->id, stream->id,
stream->request->method, stream->request->scheme,
}
else {
h2_stream_rst(stream, H2_ERR_INTERNAL_ERROR);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, stream->session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
"h2_stream(%ld-%d): RST=2 (internal err) %s %s://%s%s",
stream->session->id, stream->id,
stream->request->method, stream->request->scheme,
status = h2_mplx_in_write(stream->session->mplx, stream->id, stream->bbin);
if (status != APR_SUCCESS) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, stream->session->mplx->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, stream->session->mplx->c,
"h2_stream(%ld-%d): flushing input data",
stream->session->id, stream->id);
}
apr_status_t status = APR_SUCCESS;
AP_DEBUG_ASSERT(stream);
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, stream->session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
"h2_stream(%ld-%d): closing input",
stream->session->id, stream->id);
AP_DEBUG_ASSERT(stream);
if (input_closed(stream) || !stream->request->eoh || !stream->bbin) {
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, stream->session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
"h2_stream(%ld-%d): writing denied, closed=%d, eoh=%d, bbin=%d",
stream->session->id, stream->id, input_closed(stream),
stream->request->eoh, !!stream->bbin);
return APR_EINVAL;
}
- ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, stream->session->c,
+ ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
"h2_stream(%ld-%d): add %ld input bytes",
stream->session->id, stream->id, (long)len);
apr_status_t h2_switch_init(apr_pool_t *pool, server_rec *s)
{
(void)pool;
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "h2_switch init");
+ ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, s, "h2_switch init");
return APR_SUCCESS;
}
{
apr_status_t status = apr_thread_mutex_lock(workers->lock);
if (status == APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, workers->s,
+ ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, workers->s,
"h2_workers: starting");
while (workers->worker_count < workers->min_size
if (ap_thread_stacksize != 0) {
apr_threadattr_stacksize_set(workers->thread_attr,
ap_thread_stacksize);
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
+ ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s,
"h2_workers: using stacksize=%ld",
(long)ap_thread_stacksize);
}
{
static const char *const mod_ssl[] = { "mod_ssl.c", NULL};
- ap_log_perror(APLOG_MARK, APLOG_INFO, 0, pool, "installing hooks");
+ ap_log_perror(APLOG_MARK, APLOG_TRACE1, 0, pool, "installing hooks");
/* Run once after configuration is set, but before mpm children initialize.
*/