INNER CODE UNIT · Go
init
yarlson/ftl · cmd/logs.go:30
func init() {
rootCmd.AddCommand(logsCmd)
logsCmd.Flags().BoolVarP(&follow, "follow", "f", false, "Stream logs in real-time")
logsCmd.Flags().IntVarP(&tail, "tail", "n", -1, "Number of lines to show from the end of the logs")
}
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 {