1 --- a/lib/Auth/LDAP.php 2 +++ b/lib/Auth/LDAP.php 3 @@ -43,7 +43,7 @@ 4 // Causes nesting levels to be too deep...? 5 //$this->config_set('config_get_hook', array($this, "_config_get")); 6 7 - $this->config_set("debug", true); 8 + $this->config_set("debug", Log::mode() == Log::TRACE); 9 $this->config_set("log_hook", array($this, "_log")); 10 11 $this->config_set("config_root_dn", "cn=config"); 12 @@ -1208,6 +1208,9 @@ 13 Log::debug($str . $msg); 14 break; 15 case LOG_ERR: 16 + case LOG_ALERT: 17 + case LOG_CRIT: 18 + case LOG_EMERG: 19 Log::error($str . $msg); 20 break; 21 case LOG_INFO: 22 @@ -1216,9 +1219,6 @@ 23 case LOG_WARNING: 24 Log::warning($str . $msg); 25 break; 26 - case LOG_ALERT: 27 - case LOG_CRIT: 28 - case LOG_EMERG: 29 case LOG_NOTICE: 30 default: 31 Log::trace($str . $msg);