ferry/tools/config/log.go

18 lines
240 B
Go
Raw Normal View History

2020-07-13 20:33:20 +08:00
package config
import "github.com/spf13/viper"
type Log struct {
Dir string
Operdb bool
}
func InitLog(cfg *viper.Viper) *Log {
return &Log{
Dir: cfg.GetString("dir"),
Operdb: cfg.GetBool("operdb"),
}
}
var LogConfig = new(Log)