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/06/08 18:16:27 UTC
svn commit: r952717 - /incubator/wookie/trunk/connector/php/Logger.php
Author: raido
Date: Tue Jun 8 16:16:26 2010
New Revision: 952717
URL: http://svn.apache.org/viewvc?rev=952717&view=rev
Log:
Fix PHP logger bug.
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=952717&r1=952716&r2=952717&view=diff
==============================================================================
--- incubator/wookie/trunk/connector/php/Logger.php (original)
+++ incubator/wookie/trunk/connector/php/Logger.php Tue Jun 8 16:16:26 2010
@@ -52,15 +52,17 @@ class Logger {
*/
public function write($str) {
$path = $this->getPath();
- 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>";
- }
+ if(!empty($path)) {
+ if(is_dir($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>";
+ }
+ }
}
}