log.go 330 字节
Newer Older
E
eoLinker API Management 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
package console

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

func InitLog()  {
	c, _ := module.Get(module.ConsoleLog)

	period,_:=log.ParsePeriod(c.Period)
	log.SetOutPut(c.Enable ,c.Dir,c.File,period,c.Expire)
	l,_:= log.ParseLevel(c.Level)
	log.SetLevel(l)
}