logstash/cookbook — pull request #65 by bashcoder (2013-08-04 18:39:29+00:00)
Title: Remove extra spaces that cause Apache syntax errors, formatting issues

This patch fixes issues where extra spaces were added, causing Apache syntax errors and minor formatting issues. The syntax errors include things like `% U` instead of `%U` for urlpath. The formatting issues include log output where the request method logs as "GET " instead of "GET".

Not included in this patch, however, is the fact that with Apache 2.2 and mod_macro 1.1.x, the extra padding to the left of the LogFormat lines gets included in the actual log output. So all of the lines between `LogFormat` and `CustomLog` should be fully left-justified to avoid extra tabs or spaces appearing in the log. The whitespace is harmless as far as valid JSON is concerned, but they do increase log size. If desired, I can submit that change as well.