From 1b734501bdbec3a0ff04458944683eae0990d9ae Mon Sep 17 00:00:00 2001
From: Lunny Xiao <xiaolunwen@gmail.com>
Date: Sat, 26 Apr 2014 14:14:48 +0800
Subject: [PATCH] bug fixed

---
 modules/base/conf.go | 8 ++++----
 serve.go             | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/base/conf.go b/modules/base/conf.go
index 5724504503..04c1245774 100644
--- a/modules/base/conf.go
+++ b/modules/base/conf.go
@@ -316,7 +316,7 @@ func NewConfigContext() {
 	// load LDAP authentication configuration if present
 	LdapAuth = Cfg.MustBool("security", "LDAP_AUTH", false)
 	if LdapAuth {
-		log.Debug("LDAP AUTHENTICATION activated")
+		qlog.Debug("LDAP AUTHENTICATION activated")
 		nbsrc := 0
 		for _, v := range Cfg.GetSectionList() {
 			if matched, _ := regexp.MatchString("(?i)^LDAPSOURCE.*", v); matched {
@@ -329,15 +329,15 @@ func NewConfigContext() {
 				ldapmsadsaformat := Cfg.MustValue(v, "MSADSAFORMAT", "%s")
 				ldap.AddSource(ldapname, ldaphost, ldapport, ldapbasedn, ldapattribute, ldapfilter, ldapmsadsaformat)
 				nbsrc += 1
-				log.Debug("%s added as LDAP source", ldapname)
+				qlog.Debug("%s added as LDAP source", ldapname)
 			}
 		}
 		if nbsrc == 0 {
-			log.Debug("No valide LDAP found, LDAP AUTHENTICATION NOT activated")
+			qlog.Debug("No valide LDAP found, LDAP AUTHENTICATION NOT activated")
 			LdapAuth = false
 		}
 	} else {
-		log.Debug("LDAP AUTHENTICATION NOT activated")
+		qlog.Debug("LDAP AUTHENTICATION NOT activated")
 	}
 
 	PictureService = Cfg.MustValue("picture", "SERVICE")
diff --git a/serve.go b/serve.go
index 7f8c267c78..e3197a23de 100644
--- a/serve.go
+++ b/serve.go
@@ -53,6 +53,7 @@ func newLogger(execDir string) {
 	}
 
 	qlog.SetOutput(f)
+	//qlog.SetOutputLevel(qlog.Ldebug)
 	qlog.Info("Start logging serv...")
 }