summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2012-08-07 15:47:00 +0200
committerAleksander Machniak <machniak@kolabsys.com>2012-08-07 15:47:00 +0200
commit0d9247410814ad049bd0c2664322ae8df9ad3126 (patch)
treeb8156bda7cffa4d525b551717f9190d7d44f0aa7
parent9a2666445c4c7f0309e0b30c57d8c3100d2bf547 (diff)
downloadwebadmin-0d9247410814ad049bd0c2664322ae8df9ad3126.tar.gz
More Log usage
-rw-r--r--lib/SQL.php9
-rw-r--r--lib/kolab_client_api.php2
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/SQL.php b/lib/SQL.php
index 5024be7..b3d3823 100644
--- a/lib/SQL.php
+++ b/lib/SQL.php
@@ -54,8 +54,9 @@ class SQL
public function __construct($_conn = 'kolab_wap')
{
- $this->name = $_conn;
$conf = Conf::get_instance();
+
+ $this->name = $_conn;
$this->sql_uri = $conf->get($_conn, 'sql_uri');
}
@@ -77,10 +78,12 @@ class SQL
$start = $pos + strlen($param) + 1;
}
+ Log::trace("SQL: $query");
+
$result = mysql_query($query);
if (!$result) {
- write_log('errors', 'SQL Error: ' . mysql_error($this->conn));
+ Log::error('SQL Error: ' . mysql_error($this->conn));
}
return $result;
@@ -107,6 +110,8 @@ class SQL
private function _connect()
{
if (!$this->conn) {
+ Log::debug("SQL: Connecting to " . $this->sql_uri);
+
$_uri = parse_url($this->sql_uri);
$this->_username = $_uri['user'];
$this->_password = $_uri['pass'];
diff --git a/lib/kolab_client_api.php b/lib/kolab_client_api.php
index cf2f946..aeb37a5 100644
--- a/lib/kolab_client_api.php
+++ b/lib/kolab_client_api.php
@@ -78,7 +78,7 @@ class kolab_client_api
$this->request->setConfig($optname, $optvalue);
}
catch (Exception $e) {
- write_log('errors', $e->getMessage());
+ Log::error("HTTP: " . $e->getMessage());
}
}
}