Remove log duplication with ap_log_error() and friends#941
Remove log duplication with ap_log_error() and friends#941michael-o wants to merge 1 commit intoGrahamDumpleton:developfrom
ap_log_error() and friends#941Conversation
Previously, every log line contained the string 'mod_wsgi' along with the current pid. Both duplicate error log format parameters '%P' (current pid) and '%m' (the module logging). Hence, remove the duplication.
|
If necessary, I can move the message fixes into a separate PR. |
|
@GrahamDumpleton Any chance to have this reviewed? |
|
Why it is the format it is, is because Apache 1.3, when all this code was mostly written, did not have a way of logging process ID as part of error log format. That pid/tid is shown at all, is only because it got added to default error log format in Apache 2.4. That messages are logged with "mod_wsgi" prefix in them is again because Apache 1.3 didn't have a way to log what Apache module error messages were coming from. Apache 2.4 changed this as well and it started logging "wsgi:info" etc. One could eliminate both things and get rid of the whole "mod_wsgi (pid=%d): " prefix, but the concern is whether this could break things where people have existing error log parsers which are used to seeing the existing format and match on that in some way when extracting information from the error logs. The other option for now is a configuration directive for mod_wsgi changes the format it uses. You might well be the only person who ever uses it though. |
|
The only other option which can be used to signal the change is to release mod_wsgi as 6.0 on next release. Mainly because has been so long since a release, but also use it as a point to introduce other significant changes, such as officially no longer supporting Windows. |
Oh, didn't even know that. I started with 2.x and mod_wsgi with 2.4.
True, I do use fluent-bit on the error log to Victoria Logs, but the wsgi prefix is part of the message because pid is a separate field.
I agree, too little benefit for too much work. |
I'd be in favor of that. I didn't even expect mod_wsgi to run on Windows. |
Previously, every log line contained the string 'mod_wsgi' along with the current pid. Both duplicate error log format parameters
%P(current pid) and%m(the module logging). Hence, remove the duplication.Moreover, I have fixed a few messages for position for args or consistent style.
Log sample after change:
httpd-error.log:
vhost-error.log:
All information is retained through
ErrorLogFormat: