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)
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()