Skip to content
Browse files

Debug using error_log() instead of stderr by default

  • Loading branch information...
1 parent aeb6671 commit 3f4eb67c75e906df4ef961f4356d145ba1b4ee27 @mkozhukh mkozhukh committed with Aug 13, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 NotORM.php
  2. +1 −1 NotORM/Result.php
View
2 NotORM.php
@@ -40,7 +40,7 @@ protected function access($key, $delete = false) {
/** Database representation
-* @property-write mixed $debug = false Enable debugging queries, true for fwrite(STDERR, $query), callback($query, $parameters) otherwise
+* @property-write mixed $debug = false Enable debugging queries, true for error_log($query), callback($query, $parameters) otherwise
* @property-write bool $freeze = false Disable persistence
* @property-write string $rowClass = 'NotORM_Row' Class used for created objects
* @property-write bool $jsonAsArray = false Use array instead of object in Result JSON serialization
View
2 NotORM/Result.php
@@ -150,7 +150,7 @@ protected function query($query, $parameters) {
break;
}
}
- fwrite(STDERR, "$backtrace[file]:$backtrace[line]:$debug\n");
+ error_log("$backtrace[file]:$backtrace[line]:$debug\n", 0);
} elseif (call_user_func($this->notORM->debug, $query, $parameters) === false) {
return false;
}

0 comments on commit 3f4eb67

Please sign in to comment.
Something went wrong with that request. Please try again.