示例#1
0
文件: main.go 项目: yiqguo/LogCollect
func main() {
	log.Info("start collectin file...")
	path := config.GetString("filepath")
	if path == "" {
		log.Error("can't find filepath")
		os.Exit(0)
	}
	input.Run(path)
}
示例#2
0
文件: read.go 项目: yiqguo/LogCollect
func Run(path string) {
	go ReadFile(path)
	outtype := config.GetString("outtype")
	if outtype == "" {
		log.Error("cat't find outtype")
		os.Exit(0)
	}

	router.Run(&logstream, outtype)
}