Ich bin nicht sicher, habe aber eine Vermutung: Das macht der Apache. Ausprobieren kann ich das nicht, weil bei mir keine Apachen mehr laufen.
Nachvollziehbar ist in jedem Fall, warum er ein
"\n" (Newline, 1 Byte) in ein
'\n' (Backslash + 'n', zwei Byte) umwandelt: Täte er das nicht, dann könnte man mit geeigneten Fehlermeldungen neue Zeilen ins Error-Logging einfüllen, die dann im harmlosen Fall den Auswerter stören und im unangenehmen Fall wie "echte" Fehlermeldungen aussehen.
Eine genaue Quelle kann ich nicht angeben, aber für andere Felder ist das Verhalten
beschrieben:
QuoteFor security reasons, starting with version 2.0.46, non-printable and other special characters in %r, %i and %o are escaped using \xhh sequences, where hh stands for the hexadecimal representation of the raw byte. Exceptions from this rule are " and \, which are escaped by prepending a backslash, and all whitespace characters, which are written in their C-style notation (\n, \t, etc). In versions prior to 2.0.46, no escaping was performed on these strings so you had to be quite careful when dealing with raw log files.