Summary: | ErrorLogFormat is ignored by some modules | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Dave <apache-b6e> |
Component: | Core | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | NEW --- | ||
Severity: | minor | Keywords: | ErrorMessage, PatchAvailable |
Priority: | P2 | ||
Version: | 2.5-HEAD | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
Fall back to ap_server_conf for ErrorLogFormat
Fix ErrorLogFormat in ap_log_perror() |
Update to report: the bug applies to all logging that uses ap_log_perror(). ErrorLogFormat is not applied when using ap_log_perror(): no server_rec is passed to log_error_core(), meaning sconf is never set and therefore sconf->error_log_format not used. Much more elegant solution than proposed patch is simply to supply ap_server_core inside ap_log_perror_() in server/log.c: - log_error_core(file, line, module_index, level, status, NULL, NULL, NULL, + log_error_core(file, line, module_index, level, status, ap_server_core, NULL, NULL, (fixes for me) Created attachment 30551 [details]
Fix ErrorLogFormat in ap_log_perror()
|
Created attachment 30532 [details] Fall back to ap_server_conf for ErrorLogFormat Modules that do not provide s->module_config (such as mod_cgid) completely bypass any ErrorLogFormat directives and get the default error log format applied to all error messages generated by them. Possible solution is to drop back to ap_server_conf->module_config where available (patch enclosed)