コード例 #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)
}