commit 5960d5f1e56d80032fe25b768b0e3bb158a4dfcc
parent cb67aa37f397ddd396caaa1ddae27f4be7b70967
Author: MTRNord <mtrnord1@gmail.com>
Date: Tue, 3 Feb 2015 07:36:28 +0100
try to debug more
Diffstat:
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/core/api/v1/DbConnect.class.php b/core/api/v1/DbConnect.class.php
@@ -30,7 +30,7 @@ class DbConnect {
* @return database connection handler
*/
function connect() {
- include_once $root . '/core/config/Config.php';
+ include_once $root . '/core/config/api.php';
// Connecting to mysql database
$this->conn = new mysqli(DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME);
diff --git a/core/api/v1/api.php b/core/api/v1/api.php
@@ -19,7 +19,9 @@ require_once $root . '/core/libs/Slim/Slim.php';
$app = new \Slim\Slim(array(
'debug' => true,
- 'mode' => 'development'
+ 'mode' => 'development',
+ 'log.writer' => new \My\LogWriter(),
+ 'log.enabled' => true
));
@@ -350,6 +352,6 @@ function echoRespnse($status_code, $response) {
echo json_encode($response);
}
-
+$log = $app->getLog();
$app->run();
?>
\ No newline at end of file