Search code examples
log4php

Apache log4php documentation: "Note that" - what?


In the documentation for log4php (at http://logging.apache.org/log4php/docs/appender/layout.html) there is the following line for the linebreak token in the layout pattern:

 %n A line break. Note that

... and that's it! What should the rest of the line say?

(I think it's a reference to the linebreak character being \n or \r\n depending on the native OS.)


Solution

  • It is an error, "Note that" should have been removed. My guess is, it has not been corrected when the docs are ported from log4j to log4php.

    log4php transforms %n with PHP_EOL. This should use lineendings in a crossplattfrom friendly way

    (see also: http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/helpers/LoggerPatternParser.php?view=markup )

    Hope that helped!

    Cheers Christian