4f819dbd by asta.xie

Add a function SetLogFuncCall to enable

1 parent 3f5fee2d
...@@ -60,7 +60,6 @@ var ( ...@@ -60,7 +60,6 @@ var (
60 AdminHttpPort int 60 AdminHttpPort int
61 FlashName string // name of the flash variable found in response header and cookie 61 FlashName string // name of the flash variable found in response header and cookie
62 FlashSeperator string // used to seperate flash key:value 62 FlashSeperator string // used to seperate flash key:value
63 EnableLogFuncCallDepth bool // enable the funcCallDeppth
64 ) 63 )
65 64
66 func init() { 65 func init() {
...@@ -134,10 +133,6 @@ func init() { ...@@ -134,10 +133,6 @@ func init() {
134 // init BeeLogger 133 // init BeeLogger
135 BeeLogger = logs.NewLogger(10000) 134 BeeLogger = logs.NewLogger(10000)
136 BeeLogger.SetLogger("console", "") 135 BeeLogger.SetLogger("console", "")
137 if EnableLogFuncCallDepth {
138 BeeLogger.EnableFuncCallDepth(true)
139 BeeLogger.SetLogFuncCallDepth(3)
140 }
141 136
142 err := ParseConfig() 137 err := ParseConfig()
143 if err != nil && !os.IsNotExist(err) { 138 if err != nil && !os.IsNotExist(err) {
......
...@@ -22,6 +22,11 @@ func SetLevel(l int) { ...@@ -22,6 +22,11 @@ func SetLevel(l int) {
22 BeeLogger.SetLevel(l) 22 BeeLogger.SetLevel(l)
23 } 23 }
24 24
25 func SetLogFuncCall(b bool) {
26 BeeLogger.EnableFuncCallDepth(b)
27 BeeLogger.SetLogFuncCallDepth(3)
28 }
29
25 // logger references the used application logger. 30 // logger references the used application logger.
26 var BeeLogger *logs.BeeLogger 31 var BeeLogger *logs.BeeLogger
27 32
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!