| 1183 | } |
| 1184 | |
| 1185 | static int multi_log_transaction(request_rec *r) |
| 1186 | { |
| 1187 | multi_log_state *mls = ap_get_module_config(r->server->module_config, |
| 1188 | &log_config_module); |
| 1189 | config_log_state *clsarray; |
| 1190 | int i; |
| 1191 | |
| 1192 | /* |
| 1193 | * Initialize per request state |
| 1194 | */ |
| 1195 | log_request_state *state = apr_pcalloc(r->pool, sizeof(log_request_state)); |
| 1196 | ap_set_module_config(r->request_config, &log_config_module, state); |
| 1197 | |
| 1198 | /* |
| 1199 | * Log this transaction.. |
| 1200 | */ |
| 1201 | if (mls->config_logs->nelts) { |
| 1202 | clsarray = (config_log_state *) mls->config_logs->elts; |
| 1203 | for (i = 0; i < mls->config_logs->nelts; ++i) { |
| 1204 | config_log_state *cls = &clsarray[i]; |
| 1205 | |
| 1206 | config_log_transaction(r, cls, mls->default_format); |
| 1207 | } |
| 1208 | } |
| 1209 | |
| 1210 | if (mls->server_config_logs) { |
| 1211 | clsarray = (config_log_state *) mls->server_config_logs->elts; |
| 1212 | for (i = 0; i < mls->server_config_logs->nelts; ++i) { |
| 1213 | config_log_state *cls = &clsarray[i]; |
| 1214 | |
| 1215 | if (cls->inherit || !mls->config_logs->nelts) { |
| 1216 | config_log_transaction(r, cls, mls->default_format); |
| 1217 | } |
| 1218 | } |
| 1219 | } |
| 1220 | |
| 1221 | return OK; |
| 1222 | } |
| 1223 | |
| 1224 | /***************************************************************** |
| 1225 | * |
nothing calls this directly
no test coverage detected