logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject svn commit: r1187483 - /logging/log4php/trunk/src/main/php/LoggerAppender.php
Date Fri, 21 Oct 2011 18:03:43 GMT
Author: ihabunek
Date: Fri Oct 21 18:03:42 2011
New Revision: 1187483

URL: http://svn.apache.org/viewvc?rev=1187483&view=rev
Log:
Added a helper warn() method to appenders.

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

Modified: logging/log4php/trunk/src/main/php/LoggerAppender.php
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/LoggerAppender.php?rev=1187483&r1=1187482&r2=1187483&view=diff
==============================================================================
--- logging/log4php/trunk/src/main/php/LoggerAppender.php (original)
+++ logging/log4php/trunk/src/main/php/LoggerAppender.php Fri Oct 21 18:03:42 2011
@@ -271,4 +271,9 @@ abstract class LoggerAppender {
 		$this->closed = true;
 	}
 	
+	/** Triggers a warning for this logger with the given message. */
+	protected function warn($message) {
+		trigger_error("log4php: appender [{$this->name}]: $message", E_USER_WARNING);
+	}
+	
 }



Mime
View raw message