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

有帮助吗?

解决方案

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

其他提示

The text is actually:

Note that a line break will not be printed unless explicitely specified.

From: http://logging.apache.org/log4php/docs/layouts/pattern.html

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top