You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ih...@apache.org on 2011/10/23 16:06:43 UTC

svn commit: r1187886 - /logging/log4php/trunk/src/main/php/LoggerLayout.php

Author: ihabunek
Date: Sun Oct 23 14:06:42 2011
New Revision: 1187886

URL: http://svn.apache.org/viewvc?rev=1187886&view=rev
Log:
Added a warn() method to LoggerLayout, similar to the one in LoggerAppender.

Modified:
    logging/log4php/trunk/src/main/php/LoggerLayout.php

Modified: logging/log4php/trunk/src/main/php/LoggerLayout.php
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/LoggerLayout.php?rev=1187886&r1=1187885&r2=1187886&view=diff
==============================================================================
--- logging/log4php/trunk/src/main/php/LoggerLayout.php (original)
+++ logging/log4php/trunk/src/main/php/LoggerLayout.php Sun Oct 23 14:06:42 2011
@@ -66,4 +66,9 @@ abstract class LoggerLayout {
 	public function getHeader() {
 		return null;
 	}
+	
+	/** Triggers a warning for this layout with the given message. */
+	protected function warn($message) {
+		trigger_error("log4php: [" . get_class($this) . "]: $message", E_USER_WARNING);
+	}
 }