INNER CODE UNIT · Go

runLogs

yarlson/ftl · cmd/logs.go:36

func runLogs(cmd *cobra.Command, args []string) {
	var serviceName string
	if len(args) > 0 {
		serviceName = args[0]
	}

	if follow && !cmd.Flags().Lookup("tail").Changed {
		tail = 100
	}

	cfg, err := parseConfig("ftl.yaml")
	if err != nil {
		console.Error("Failed to parse config file:", err)
		return
	}

	if err := getLogs(cfg, serviceName, follow, tail); err != nil {
		console.Error("Failed to fetch logs:", err)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…