You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by ra...@apache.org on 2010/05/05 20:15:43 UTC
svn commit: r941409 - /incubator/wookie/trunk/connector/php/Logger.php
Author: raido
Date: Wed May 5 18:15:43 2010
New Revision: 941409
URL: http://svn.apache.org/viewvc?rev=941409&view=rev
Log:
Add better Logger path check.
Modified:
incubator/wookie/trunk/connector/php/Logger.php
Modified: incubator/wookie/trunk/connector/php/Logger.php
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/connector/php/Logger.php?rev=941409&r1=941408&r2=941409&view=diff
==============================================================================
--- incubator/wookie/trunk/connector/php/Logger.php (original)
+++ incubator/wookie/trunk/connector/php/Logger.php Wed May 5 18:15:43 2010
@@ -52,12 +52,14 @@ class Logger {
*/
public function write($str) {
$path = $this->getPath();
- if(!empty($path)) {
+ if(is_dir($path) && !empty($path)) {
$str = "[ ".date("d/m/Y H:i:s")." ] ".$str."\n";
$fileWriter = @file_put_contents($path."wookie_php.0.log", $str, FILE_APPEND);
if(!$fileWriter) {
echo "<b>Wookie PHP: Writing to log failed, check permissions/path</b>";
}
+ } else {
+ echo "<b>Wookie PHP: Path is not a directory</b>";
}
}