Browse Source

NewLogger set to display line number

tags/v1.2.0-rc1
slene 11 years ago
parent
commit
3f65760739
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      modules/log/log.go

+ 3
- 2
modules/log/log.go View File

@@ -15,13 +15,14 @@ var (
) )


func init() { func init() {
logger = logs.NewLogger(10000)
logger.SetLogger("console", `{"level": 0}`)
NewLogger(10000, "console", `{"level": 0}`)
} }


func NewLogger(bufLen int64, mode, config string) { func NewLogger(bufLen int64, mode, config string) {
Mode, Config = mode, config Mode, Config = mode, config
logger = logs.NewLogger(bufLen) logger = logs.NewLogger(bufLen)
logger.EnableFuncCallDepth(true)
logger.SetLogFuncCallDepth(4)
logger.SetLogger(mode, config) logger.SetLogger(mode, config)
} }




Loading…
Cancel
Save