mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 07:00:55 +00:00
Add a function SetLogFuncCall to enable
This commit is contained in:
parent
3f5fee2dc6
commit
4f819dbd9a
@ -60,7 +60,6 @@ var (
|
|||||||
AdminHttpPort int
|
AdminHttpPort int
|
||||||
FlashName string // name of the flash variable found in response header and cookie
|
FlashName string // name of the flash variable found in response header and cookie
|
||||||
FlashSeperator string // used to seperate flash key:value
|
FlashSeperator string // used to seperate flash key:value
|
||||||
EnableLogFuncCallDepth bool // enable the funcCallDeppth
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -134,10 +133,6 @@ func init() {
|
|||||||
// init BeeLogger
|
// init BeeLogger
|
||||||
BeeLogger = logs.NewLogger(10000)
|
BeeLogger = logs.NewLogger(10000)
|
||||||
BeeLogger.SetLogger("console", "")
|
BeeLogger.SetLogger("console", "")
|
||||||
if EnableLogFuncCallDepth {
|
|
||||||
BeeLogger.EnableFuncCallDepth(true)
|
|
||||||
BeeLogger.SetLogFuncCallDepth(3)
|
|
||||||
}
|
|
||||||
|
|
||||||
err := ParseConfig()
|
err := ParseConfig()
|
||||||
if err != nil && !os.IsNotExist(err) {
|
if err != nil && !os.IsNotExist(err) {
|
||||||
|
5
log.go
5
log.go
@ -22,6 +22,11 @@ func SetLevel(l int) {
|
|||||||
BeeLogger.SetLevel(l)
|
BeeLogger.SetLevel(l)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SetLogFuncCall(b bool) {
|
||||||
|
BeeLogger.EnableFuncCallDepth(b)
|
||||||
|
BeeLogger.SetLogFuncCallDepth(3)
|
||||||
|
}
|
||||||
|
|
||||||
// logger references the used application logger.
|
// logger references the used application logger.
|
||||||
var BeeLogger *logs.BeeLogger
|
var BeeLogger *logs.BeeLogger
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user