mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
mod_dumpio: s/ap_log_error/ap_log_cerror/
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199520 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -55,12 +55,12 @@ static void dumpit(ap_filter_t *f, apr_bucket *b, dumpio_conf_t *ptr)
|
|||||||
{
|
{
|
||||||
conn_rec *c = f->c;
|
conn_rec *c = f->c;
|
||||||
|
|
||||||
ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, c->base_server,
|
ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c,
|
||||||
"mod_dumpio: %s (%s-%s): %" APR_SIZE_T_FMT " bytes",
|
"mod_dumpio: %s (%s-%s): %" APR_SIZE_T_FMT " bytes",
|
||||||
f->frec->name,
|
f->frec->name,
|
||||||
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
|
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
|
||||||
b->type->name,
|
b->type->name,
|
||||||
b->length) ;
|
b->length) ;
|
||||||
|
|
||||||
if (!(APR_BUCKET_IS_METADATA(b)))
|
if (!(APR_BUCKET_IS_METADATA(b)))
|
||||||
{
|
{
|
||||||
@@ -84,10 +84,10 @@ static void dumpit(ap_filter_t *f, apr_bucket *b, dumpio_conf_t *ptr)
|
|||||||
memcpy(xlatebuf, buf, logbytes);
|
memcpy(xlatebuf, buf, logbytes);
|
||||||
ap_xlate_proto_from_ascii(xlatebuf, logbytes);
|
ap_xlate_proto_from_ascii(xlatebuf, logbytes);
|
||||||
xlatebuf[logbytes] = '\0';
|
xlatebuf[logbytes] = '\0';
|
||||||
ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, c->base_server,
|
ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c,
|
||||||
"mod_dumpio: %s (%s-%s): %s", f->frec->name,
|
"mod_dumpio: %s (%s-%s): %s", f->frec->name,
|
||||||
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
|
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
|
||||||
b->type->name, xlatebuf);
|
b->type->name, xlatebuf);
|
||||||
#else
|
#else
|
||||||
/* XXX: Seriously flawed; we do not pay attention to embedded
|
/* XXX: Seriously flawed; we do not pay attention to embedded
|
||||||
* \0's in the request body, these should be escaped; however,
|
* \0's in the request body, these should be escaped; however,
|
||||||
@@ -97,17 +97,17 @@ static void dumpit(ap_filter_t *f, apr_bucket *b, dumpio_conf_t *ptr)
|
|||||||
* within ap_log_error, and introduce new vformatter %-escapes
|
* within ap_log_error, and introduce new vformatter %-escapes
|
||||||
* for escaping text, and for binary text (fixed len strings).
|
* for escaping text, and for binary text (fixed len strings).
|
||||||
*/
|
*/
|
||||||
ap_log_error(APLOG_MARK | APLOG_NOERRNO, APLOG_TRACE7, 0, c->base_server,
|
ap_log_cerror(APLOG_MARK | APLOG_NOERRNO, APLOG_TRACE7, 0, c,
|
||||||
"mod_dumpio: %s (%s-%s): %.*s", f->frec->name,
|
"mod_dumpio: %s (%s-%s): %.*s", f->frec->name,
|
||||||
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
|
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
|
||||||
b->type->name, (int)logbytes, buf);
|
b->type->name, (int)logbytes, buf);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ap_log_error(APLOG_MARK, APLOG_TRACE7, rv, c->base_server,
|
ap_log_cerror(APLOG_MARK, APLOG_TRACE7, rv, c,
|
||||||
"mod_dumpio: %s (%s-%s): %s", f->frec->name,
|
"mod_dumpio: %s (%s-%s): %s", f->frec->name,
|
||||||
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
|
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
|
||||||
b->type->name, "error reading data");
|
b->type->name, "error reading data");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -130,12 +130,12 @@ static int dumpio_input_filter (ap_filter_t *f, apr_bucket_brigade *bb,
|
|||||||
conn_rec *c = f->c;
|
conn_rec *c = f->c;
|
||||||
dumpio_conf_t *ptr = f->ctx;
|
dumpio_conf_t *ptr = f->ctx;
|
||||||
|
|
||||||
ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, c->base_server,
|
ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c,
|
||||||
"mod_dumpio: %s [%s-%s] %" APR_OFF_T_FMT " readbytes",
|
"mod_dumpio: %s [%s-%s] %" APR_OFF_T_FMT " readbytes",
|
||||||
f->frec->name,
|
f->frec->name,
|
||||||
whichmode(mode),
|
whichmode(mode),
|
||||||
((block) == APR_BLOCK_READ) ? "blocking" : "nonblocking",
|
((block) == APR_BLOCK_READ) ? "blocking" : "nonblocking",
|
||||||
readbytes) ;
|
readbytes) ;
|
||||||
|
|
||||||
ret = ap_get_brigade(f->next, bb, mode, block, readbytes);
|
ret = ap_get_brigade(f->next, bb, mode, block, readbytes);
|
||||||
|
|
||||||
@@ -144,8 +144,8 @@ static int dumpio_input_filter (ap_filter_t *f, apr_bucket_brigade *bb,
|
|||||||
dumpit(f, b, ptr);
|
dumpit(f, b, ptr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, c->base_server,
|
ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c,
|
||||||
"mod_dumpio: %s - %d", f->frec->name, ret) ;
|
"mod_dumpio: %s - %d", f->frec->name, ret) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
return APR_SUCCESS ;
|
return APR_SUCCESS ;
|
||||||
@@ -157,7 +157,7 @@ static int dumpio_output_filter (ap_filter_t *f, apr_bucket_brigade *bb)
|
|||||||
conn_rec *c = f->c;
|
conn_rec *c = f->c;
|
||||||
dumpio_conf_t *ptr = f->ctx;
|
dumpio_conf_t *ptr = f->ctx;
|
||||||
|
|
||||||
ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, c->base_server, "mod_dumpio: %s", f->frec->name) ;
|
ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c, "mod_dumpio: %s", f->frec->name);
|
||||||
|
|
||||||
for (b = APR_BRIGADE_FIRST(bb); b != APR_BRIGADE_SENTINEL(bb); b = APR_BUCKET_NEXT(b)) {
|
for (b = APR_BRIGADE_FIRST(bb); b != APR_BRIGADE_SENTINEL(bb); b = APR_BUCKET_NEXT(b)) {
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user