func processConfigFile()

in init/fluent_bit_init_process.go [191:207]


func processConfigFile(path string) {
	contentBytes, err := ioutil.ReadFile(path)
	if err != nil {
		logrus.Errorln(err)
		logrus.Fatalf("[FluentBit Init Process] Cannot open file: %s\n", path)
	}

	content := string(contentBytes)

	if strings.Contains(content, "[PARSER]") || strings.Contains(content, "[MULTILINE_PARSER]") {
		// this is a parser config file, change command
		updateCommand(path)
	} else {
		// this is not a parser config file. @INCLUDE
		writeInclude(path, mainConfigFile)
	}
}