log.go 338 字节
Newer Older
E
eoLinker API Management 已提交
1 2 3 4 5 6 7
package console

import (
	module "github.com/eolinker/goku/console/module/config-log"
	log "github.com/eolinker/goku/goku-log"
)

Y
Your Name 已提交
8
func InitLog() {
E
eoLinker API Management 已提交
9 10
	c, _ := module.Get(module.ConsoleLog)

Y
Your Name 已提交
11 12 13
	period, _ := log.ParsePeriod(c.Period)
	log.SetOutPut(c.Enable, c.Dir, c.File, period, c.Expire)
	l, _ := log.ParseLevel(c.Level)
E
eoLinker API Management 已提交
14
	log.SetLevel(l)
Y
Your Name 已提交
15
}