summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-08-26 01:24:23 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-08-26 01:24:23 (GMT)
commit7ffbe89530f0a355bb628b453a7766e68d1d2968 (patch)
tree928a5171536f490d943e37add6dfb4edd10d1e0a
parentda397091f63d3bfd0cf33165f9128fee47df9f39 (diff)
downloadkolab-wap-7ffbe89530f0a355bb628b453a7766e68d1d2968.tar.gz
Use consistent logging function
-rw-r--r--lib/Auth/LDAP.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index 2dfe084..2287e03 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -60,11 +60,11 @@ class LDAP extends Net_LDAP3 {
try {
$domain = $_SESSION['user']->get_domain();
} catch (Exception $e) {
- Log::warning("LDAP: User not authenticated yet");
+ $this->_log(LOG_WARNING, "LDAP: User not authenticated yet");
}
}
} else {
- Log::debug("LDAP: __construct() using domain $domain");
+ $this->_log(LOG_DEBUG, "LDAP: __construct() using domain $domain");
}
// Continue and default to the primary domain.
@@ -127,7 +127,7 @@ class LDAP extends Net_LDAP3 {
*/
public function authenticate($username, $password, $domain = NULL)
{
- Log::debug("Auth::LDAP: authentication request for $username against domain $domain");
+ $this->_log(LOG_DEBUG, "Auth::LDAP: authentication request for $username against domain $domain");
if (!$this->connect()) {
return false;
@@ -302,7 +302,7 @@ class LDAP extends Net_LDAP3 {
$attrs['nsslapd-directory'] = $this->nsslapd_directory($ldap, $domain);
}
if (!$ldap->add_entry($dn, $attrs)) {
- Log::error("Error adding $dn to $replica_host");
+ $this->_log(LOG_ERR, "Error adding $dn to $replica_host");
}
}
$ldap->close();
@@ -314,7 +314,7 @@ class LDAP extends Net_LDAP3 {
$attrs['nsslapd-directory'] = $this->nsslapd_directory($this, $domain);
}
if (!$this->add_entry($dn, $attrs)) {
- Log::error("Error adding $dn");
+ $this->_log(LOG_ERR, "Error adding $dn");
}
}
}
@@ -1110,7 +1110,7 @@ class LDAP extends Net_LDAP3 {
$unique_attr = 'nsuniqueid';
}
- Log::trace("Using unique_attribute " . var_export($unique_attr, TRUE) . " at " . __FILE__ . ":" . __LINE__);
+ $this->_log(LOG_NOTICE, "Using unique_attribute " . var_export($unique_attr, TRUE) . " at " . __FILE__ . ":" . __LINE__);
if (!in_array($unique_attr, $attributes)) {
$attributes[] = $unique_attr;
@@ -1681,7 +1681,7 @@ class LDAP extends Net_LDAP3 {
// only report once
if (!$seen["$host:$port"]++) {
$this->mc_available--;
- Log::error("Memcache failure on host $host:$port");
+ $this->_log(LOG_ERR, "Memcache failure on host $host:$port");
}
}