mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
42 lines
847 B
Go
42 lines
847 B
Go
// Copyright (C) 2025, Lux Industries Inc. All rights reserved.
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package commands
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
log "github.com/luxfi/log"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// NewLogsCmd creates the logs command
|
|
func NewLogsCmd(logger log.Logger) *cobra.Command {
|
|
var (
|
|
follow bool
|
|
tail int
|
|
)
|
|
|
|
cmd := &cobra.Command{
|
|
Use: "logs [engine]",
|
|
Short: "View engine logs",
|
|
Args: cobra.ExactArgs(1),
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
engineName := args[0]
|
|
|
|
fmt.Printf("📜 Logs for engine '%s':\n", engineName)
|
|
|
|
// TODO: Implement log streaming
|
|
fmt.Println("(Log streaming not yet implemented)")
|
|
|
|
return nil
|
|
},
|
|
}
|
|
|
|
cmd.Flags().BoolVarP(&follow, "follow", "f", false, "Follow log output")
|
|
cmd.Flags().IntVar(&tail, "tail", 100, "Number of lines to show")
|
|
|
|
return cmd
|
|
}
|