logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ihabu...@apache.org
Subject svn commit: r1213663 - in /logging/log4php/trunk/src: changes/changes.xml main/php/appenders/LoggerAppenderFile.php
Date Tue, 13 Dec 2011 12:47:20 GMT
Author: ihabunek
Date: Tue Dec 13 12:47:19 2011
New Revision: 1213663

URL: http://svn.apache.org/viewvc?rev=1213663&view=rev
Log:
LOG4PHP-158: LoggerAppenderFile throws wrong warning messages

Modified:
    logging/log4php/trunk/src/changes/changes.xml
    logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFile.php

Modified: logging/log4php/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/changes/changes.xml?rev=1213663&r1=1213662&r2=1213663&view=diff
==============================================================================
--- logging/log4php/trunk/src/changes/changes.xml (original)
+++ logging/log4php/trunk/src/changes/changes.xml Tue Dec 13 12:47:19 2011
@@ -21,6 +21,7 @@
 	</properties>
 	<body>
 	    <release version="2.2.0" date="SVN">
+			<action date="2011-12-13" type="fix" issue="LOG4PHP-158" dev="Ivan Habunek">LoggerAppenderFile
throws wrong warning messages.</action>
 	    	<action date="2011-12-12" type="update" issue="LOG4PHP-161" dev="Ivan Habunek">All
configurable components should report errors when given invalid values</action>
 	    	<action date="2011-12-10" type="update" issue="LOG4PHP-165" dev="Ivan Habunek" due-to="Johannes
Wohlgemuth" due-to-email="j dot wohlgemuth at findologic dot com">Extended LoggerLayoutXml
to include MDC info</action>
 	    	<action date="2011-12-09" type="fix" issue="LOG4PHP-162" dev="Ivan Habunek">Warning
for invalid appender threshold level never called.</action>

Modified: logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFile.php
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFile.php?rev=1213663&r1=1213662&r2=1213663&view=diff
==============================================================================
--- logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFile.php (original)
+++ logging/log4php/trunk/src/main/php/appenders/LoggerAppenderFile.php Tue Dec 13 12:47:19
2011
@@ -60,6 +60,12 @@ class LoggerAppenderFile extends LoggerA
 	public function activateOptions() {
 		$fileName = $this->getFile();
 
+		if (empty($fileName)) {
+			$this->warn("Required parameter 'fileName' not set. Closing appender.");
+			$this->closed = true;
+			return;
+		}
+		
 		if(!is_file($fileName)) {
 			$dir = dirname($fileName);
 			if(!is_dir($dir)) {



Mime
View raw message