Files
2026-07-26 00:09:57 +08:00

24 lines
389 B
Go

package cmd
import (
"trojan/util"
"github.com/spf13/cobra"
)
var line int
// logCmd represents the log command
var logCmd = &cobra.Command{
Use: "log",
Short: "查看trojan日志",
Run: func(cmd *cobra.Command, args []string) {
util.Log("trojan", line)
},
}
func init() {
logCmd.Flags().IntVarP(&line, "line", "n", 300, "查看日志行数")
rootCmd.AddCommand(logCmd)
}