You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by gr...@apache.org on 2009/05/22 12:16:38 UTC

svn commit: r777451 - in /incubator/log4php/trunk/src/main/php: LoggerLayout.php layouts/LoggerLayoutHtml.php layouts/LoggerLayoutSimple.php layouts/LoggerLayoutTTCC.php layouts/LoggerPatternLayout.php layouts/LoggerXmlLayout.php

Author: grobmeier
Date: Fri May 22 10:16:38 2009
New Revision: 777451

URL: http://svn.apache.org/viewvc?rev=777451&view=rev
Log:
added interface type check to format methods

Modified:
    incubator/log4php/trunk/src/main/php/LoggerLayout.php
    incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutHtml.php
    incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutSimple.php
    incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutTTCC.php
    incubator/log4php/trunk/src/main/php/layouts/LoggerPatternLayout.php
    incubator/log4php/trunk/src/main/php/layouts/LoggerXmlLayout.php

Modified: incubator/log4php/trunk/src/main/php/LoggerLayout.php
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/main/php/LoggerLayout.php?rev=777451&r1=777450&r2=777451&view=diff
==============================================================================
--- incubator/log4php/trunk/src/main/php/LoggerLayout.php (original)
+++ incubator/log4php/trunk/src/main/php/LoggerLayout.php Fri May 22 10:16:38 2009
@@ -55,7 +55,7 @@
 	 * @param LoggerLoggingEvent
 	 * @return string
 	 */
-	public function format($event) {
+	public function format(LoggerLoggingEvent $event) {
 		return $event->getRenderedMessage();
 	} 
 	

Modified: incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutHtml.php
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutHtml.php?rev=777451&r1=777450&r2=777451&view=diff
==============================================================================
--- incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutHtml.php (original)
+++ incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutHtml.php Fri May 22 10:16:38 2009
@@ -112,7 +112,7 @@
      * @param LoggerLoggingEvent $event
      * @return string
      */
-    public function format($event) {
+    public function format(LoggerLoggingEvent $event) {
         $sbuf = PHP_EOL . "<tr>" . PHP_EOL;
     
         $sbuf .= "<td>";

Modified: incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutSimple.php
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutSimple.php?rev=777451&r1=777450&r2=777451&view=diff
==============================================================================
--- incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutSimple.php (original)
+++ incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutSimple.php Fri May 22 10:16:38 2009
@@ -48,7 +48,7 @@
      * @param LoggerLoggingEvent $event
      * @return string
      */
-    public function format($event) {
+    public function format(LoggerLoggingEvent $event) {
         $level = $event->getLevel();
         return $level->toString() . ' - ' . $event->getRenderedMessage(). PHP_EOL;
     }

Modified: incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutTTCC.php
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutTTCC.php?rev=777451&r1=777450&r2=777451&view=diff
==============================================================================
--- incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutTTCC.php (original)
+++ incubator/log4php/trunk/src/main/php/layouts/LoggerLayoutTTCC.php Fri May 22 10:16:38 2009
@@ -169,7 +169,7 @@
      * @param LoggerLoggingEvent $event
      * @return string
      */
-    public function format($event) {
+    public function format(LoggerLoggingEvent $event) {
         $timeStamp = (float)$event->getTimeStamp();
         $format = strftime($this->dateFormat, (int)$timeStamp);
         

Modified: incubator/log4php/trunk/src/main/php/layouts/LoggerPatternLayout.php
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/main/php/layouts/LoggerPatternLayout.php?rev=777451&r1=777450&r2=777451&view=diff
==============================================================================
--- incubator/log4php/trunk/src/main/php/layouts/LoggerPatternLayout.php (original)
+++ incubator/log4php/trunk/src/main/php/layouts/LoggerPatternLayout.php Fri May 22 10:16:38 2009
@@ -208,7 +208,7 @@
      * @param LoggerLoggingEvent $event
      * @return string
      */
-    function format($event) {
+    function format(LoggerLoggingEvent $event) {
         // Reset working stringbuffer
         $this->sbuf = '';
         $c = $this->head;

Modified: incubator/log4php/trunk/src/main/php/layouts/LoggerXmlLayout.php
URL: http://svn.apache.org/viewvc/incubator/log4php/trunk/src/main/php/layouts/LoggerXmlLayout.php?rev=777451&r1=777450&r2=777451&view=diff
==============================================================================
--- incubator/log4php/trunk/src/main/php/layouts/LoggerXmlLayout.php (original)
+++ incubator/log4php/trunk/src/main/php/layouts/LoggerXmlLayout.php Fri May 22 10:16:38 2009
@@ -99,7 +99,7 @@
      * @param LoggerLoggingEvent $event
      * @return string
      */
-    function format($event) {
+    function format(LoggerLoggingEvent $event) {
         $loggerName = $event->getLoggerName();
         $timeStamp  = number_format((float)($event->getTimeStamp() * 1000), 0, '', '');
         $thread     = $event->getThreadName();