amon-php!
Former-commit-id: c37a313ed48ed35224739a4a734af4ddcdb59a56
--- a/.gitmodules
+++ b/.gitmodules
@@ -25,4 +25,7 @@
[submodule "lib/querypath"]
path = lib/querypath
url = https://github.com/technosophos/querypath.git
+[submodule "lib/amon-php"]
+ path = lib/amon-php
+ url = https://github.com/martinrusev/amon-php.git
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -14,6 +14,11 @@
require_once $basePath.'lib/Requests/library/Requests.php';
Requests::register_autoloader();
+require $basePath."/lib/amon-php/amon.php";
+Amon::config(array('address'=> 'http://127.0.0.1:2465',
+ 'protocol' => 'http',
+ 'secret_key' => "g99127n3lkzigg8ob2rllth97d1pb4sj"));
+Amon::setup_exception_handler();
# Convert a stdClass to an Array. http://www.php.net/manual/en/language.types.object.php#102735
function object_to_array(stdClass $Class) {
--- a/include/couchdb.inc.php
+++ b/include/couchdb.inc.php
@@ -168,6 +168,7 @@
$server = new SetteeServer($serverAddr);
function setteErrorHandler($e) {
+ Amon::log($e->getMessage() . " " . print_r($_SERVER,true), array('error'));
echo $e->getMessage() . "<br>" . PHP_EOL;
}
--- /dev/null
+++ b/lib/amon-php