amon-php!
amon-php!

--- a/.gitmodules
+++ b/.gitmodules
@@ -1,4 +1,7 @@
 [submodule "lib/bubbletree"]
 	path = lib/bubbletree
 	url = https://github.com/okfn/bubbletree.git
+[submodule "lib/amon-php"]
+	path = lib/amon-php
+	url = https://github.com/martinrusev/amon-php.git
 

directory:b/lib/amon-php (new)
--- /dev/null
+++ b/lib/amon-php

--- a/lib/common.inc.php
+++ b/lib/common.inc.php
@@ -14,6 +14,11 @@
 if (strstr($_SERVER['PHP_SELF'], "labs/")) {

     $basePath = "../";

 }

+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();

 

 require ROOT . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'openid.php';

 $openid = new LightOpenID($_SERVER['HTTP_HOST']);

@@ -49,6 +54,7 @@
 function databaseError($errMsg) {

     if ($errMsg[2] != "") {

         echo '<div class="alert-message error">';

+        Amon::log(print_r($errMsg, true), array('error'));

         die(print_r($errMsg, true));

         echo "</div>";

     }