MCPcopy Create free account
hub / github.com/TalkingData/owl / InitLog

Function InitLog

controller/log.go:13–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11)
12
13func InitLog() error {
14 lg = logs.NewLogger(100)
15 lg.EnableFuncCallDepth(true)
16 lg.SetLogger("console", "")
17 param := fmt.Sprintf(`{"filename":"%s","rotate":true,"maxdays":%d}`, GlobalConfig.LOG_FILE, GlobalConfig.LOG_EXPIRE_DAYS)
18 if err := lg.SetLogger("file", param); err != nil {
19 return err
20 }
21 lg.SetLevel(GlobalConfig.LOG_LEVEL)
22 return nil
23}

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected