Skip to content

Commit fab7d73

Browse files
committed
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
1 parent 19a7754 commit fab7d73

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

modules/debugging/mod_dumpio.c

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ static void dumpit(ap_filter_t *f, apr_bucket *b, dumpio_conf_t *ptr)
5555
{
5656
conn_rec *c = f->c;
5757

58-
ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, c->base_server,
59-
"mod_dumpio: %s (%s-%s): %" APR_SIZE_T_FMT " bytes",
60-
f->frec->name,
61-
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
62-
b->type->name,
63-
b->length) ;
58+
ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c,
59+
"mod_dumpio: %s (%s-%s): %" APR_SIZE_T_FMT " bytes",
60+
f->frec->name,
61+
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
62+
b->type->name,
63+
b->length) ;
6464

6565
if (!(APR_BUCKET_IS_METADATA(b)))
6666
{
@@ -84,10 +84,10 @@ static void dumpit(ap_filter_t *f, apr_bucket *b, dumpio_conf_t *ptr)
8484
memcpy(xlatebuf, buf, logbytes);
8585
ap_xlate_proto_from_ascii(xlatebuf, logbytes);
8686
xlatebuf[logbytes] = '\0';
87-
ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, c->base_server,
88-
"mod_dumpio: %s (%s-%s): %s", f->frec->name,
89-
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
90-
b->type->name, xlatebuf);
87+
ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c,
88+
"mod_dumpio: %s (%s-%s): %s", f->frec->name,
89+
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
90+
b->type->name, xlatebuf);
9191
#else
9292
/* XXX: Seriously flawed; we do not pay attention to embedded
9393
* \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)
9797
* within ap_log_error, and introduce new vformatter %-escapes
9898
* for escaping text, and for binary text (fixed len strings).
9999
*/
100-
ap_log_error(APLOG_MARK | APLOG_NOERRNO, APLOG_TRACE7, 0, c->base_server,
101-
"mod_dumpio: %s (%s-%s): %.*s", f->frec->name,
102-
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
103-
b->type->name, (int)logbytes, buf);
100+
ap_log_cerror(APLOG_MARK | APLOG_NOERRNO, APLOG_TRACE7, 0, c,
101+
"mod_dumpio: %s (%s-%s): %.*s", f->frec->name,
102+
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
103+
b->type->name, (int)logbytes, buf);
104104
#endif
105105
}
106106
} else {
107-
ap_log_error(APLOG_MARK, APLOG_TRACE7, rv, c->base_server,
108-
"mod_dumpio: %s (%s-%s): %s", f->frec->name,
109-
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
110-
b->type->name, "error reading data");
107+
ap_log_cerror(APLOG_MARK, APLOG_TRACE7, rv, c,
108+
"mod_dumpio: %s (%s-%s): %s", f->frec->name,
109+
(APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
110+
b->type->name, "error reading data");
111111
}
112112
}
113113
}
@@ -130,12 +130,12 @@ static int dumpio_input_filter (ap_filter_t *f, apr_bucket_brigade *bb,
130130
conn_rec *c = f->c;
131131
dumpio_conf_t *ptr = f->ctx;
132132

133-
ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, c->base_server,
134-
"mod_dumpio: %s [%s-%s] %" APR_OFF_T_FMT " readbytes",
135-
f->frec->name,
136-
whichmode(mode),
137-
((block) == APR_BLOCK_READ) ? "blocking" : "nonblocking",
138-
readbytes) ;
133+
ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c,
134+
"mod_dumpio: %s [%s-%s] %" APR_OFF_T_FMT " readbytes",
135+
f->frec->name,
136+
whichmode(mode),
137+
((block) == APR_BLOCK_READ) ? "blocking" : "nonblocking",
138+
readbytes) ;
139139

140140
ret = ap_get_brigade(f->next, bb, mode, block, readbytes);
141141

@@ -144,8 +144,8 @@ static int dumpio_input_filter (ap_filter_t *f, apr_bucket_brigade *bb,
144144
dumpit(f, b, ptr);
145145
}
146146
} else {
147-
ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, c->base_server,
148-
"mod_dumpio: %s - %d", f->frec->name, ret) ;
147+
ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c,
148+
"mod_dumpio: %s - %d", f->frec->name, ret) ;
149149
}
150150

151151
return APR_SUCCESS ;
@@ -157,7 +157,7 @@ static int dumpio_output_filter (ap_filter_t *f, apr_bucket_brigade *bb)
157157
conn_rec *c = f->c;
158158
dumpio_conf_t *ptr = f->ctx;
159159

160-
ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, c->base_server, "mod_dumpio: %s", f->frec->name) ;
160+
ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c, "mod_dumpio: %s", f->frec->name);
161161

162162
for (b = APR_BRIGADE_FIRST(bb); b != APR_BRIGADE_SENTINEL(bb); b = APR_BUCKET_NEXT(b)) {
163163
/*

0 commit comments

Comments
 (0)