LoggerLayoutTTCCThe TTCC layout format was taken from Apache log4j, and originally consisted of Time, Thread, Category and nested diagnostic Context information, hence the name. LoggerLayoutTTCC contains equivalent information:
Output of LoggerLayoutTTCC is identical to that of LoggerLayoutPattern with the conversion pattern set to %d{m/d/y H:i:s,u} [%t] %p %c %x - %m%n. ParametersThe following parameters are available:
ExamplesConfiguration:
<configuration xmlns="http://logging.apache.org/log4php/"> <appender name="default" class="LoggerAppenderEcho"> <layout class="LoggerLayoutTTCC" /> </appender> <root> <appender_ref ref="default" /> </root> </configuration> array( 'appenders' => array( 'default' => array( 'class' => 'LoggerAppenderEcho', 'layout' => array( 'class' => 'LoggerLayoutTTCC', ) ) ), 'rootLogger' => array( 'appenders' => array('default') ), ) Running the following code: Logger::configure("config.xml"); $logger = Logger::getLogger('myLogger'); $logger->info("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); $logger->debug("Donec a diam lectus."); $logger->warn("Sed sit amet ipsum mauris."); Produces the following output: INFO - My first message. DEBUG - My second message. WARN - My third message. |