1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-11 05:31:01 +00:00

change beego log function to logs function

This commit is contained in:
JessonChan
2016-03-24 17:39:29 +08:00
parent 03840f3fe8
commit 98dfecfd8a
9 changed files with 43 additions and 152 deletions

View File

@ -21,6 +21,7 @@ import (
"strings"
"github.com/astaxie/beego/config"
"github.com/astaxie/beego/logs"
"github.com/astaxie/beego/session"
"github.com/astaxie/beego/utils"
)
@ -293,14 +294,14 @@ func parseConfig(appConfigPath string) (err error) {
}
//init log
BeeLogger.Reset()
logs.Reset()
for adaptor, config := range BConfig.Log.Outputs {
err = BeeLogger.SetLogger(adaptor, config)
err = logs.SetLogger(adaptor, config)
if err != nil {
fmt.Printf("%s with the config `%s` got err:%s\n", adaptor, config, err)
}
}
SetLogFuncCall(BConfig.Log.FileLineNum)
logs.SetLogFuncCall(BConfig.Log.FileLineNum)
return nil
}