logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject svn commit: r1187886 - /logging/log4php/trunk/src/main/php/LoggerLayout.php
Date Sun, 23 Oct 2011 14:06:43 GMT
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);
+	}
 }



Mime
View raw message