From 4f819dbd9a05b1cbbc579951daae3eaa9b59d3df Mon Sep 17 00:00:00 2001 From: "asta.xie" Date: Wed, 26 Mar 2014 00:06:25 +0800 Subject: [PATCH] Add a function SetLogFuncCall to enable --- config.go | 5 ----- log.go | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.go b/config.go index a054a736..54de325c 100644 --- a/config.go +++ b/config.go @@ -60,7 +60,6 @@ var ( AdminHttpPort int FlashName string // name of the flash variable found in response header and cookie FlashSeperator string // used to seperate flash key:value - EnableLogFuncCallDepth bool // enable the funcCallDeppth ) func init() { @@ -134,10 +133,6 @@ func init() { // init BeeLogger BeeLogger = logs.NewLogger(10000) BeeLogger.SetLogger("console", "") - if EnableLogFuncCallDepth { - BeeLogger.EnableFuncCallDepth(true) - BeeLogger.SetLogFuncCallDepth(3) - } err := ParseConfig() if err != nil && !os.IsNotExist(err) { diff --git a/log.go b/log.go index 6af6f7be..128e998e 100644 --- a/log.go +++ b/log.go @@ -22,6 +22,11 @@ func SetLevel(l int) { BeeLogger.SetLevel(l) } +func SetLogFuncCall(b bool) { + BeeLogger.EnableFuncCallDepth(b) + BeeLogger.SetLogFuncCallDepth(3) +} + // logger references the used application logger. var BeeLogger *logs.BeeLogger