level, followed by " - " and then the message.
*
* For example the following php and properties files
*
* {@example ../../examples/php/layout_simple.php 19}
*
* {@example ../../examples/resources/layout_simple.properties 18}
*
* would result in:
*
* INFO - Hello World!
*
* @version $Revision: 883108 $
* @package log4php
* @subpackage layouts
*/
class LoggerLayoutSimple extends LoggerLayout {
/**
* Constructor
*/
public function __construct() {
}
/**
* Returns the log statement in a format consisting of the
* level, followed by " - " and then the
* message. For example,
* INFO - "A message"
*
* @param LoggerLoggingEvent $event
* @return string
*/
public function format(LoggerLoggingEvent $event) {
$level = $event->getLevel();
return $level->toString() . ' - ' . $event->getRenderedMessage(). PHP_EOL;
}
}