(cmd *cobra.Command, args []string)
| 27 | } |
| 28 | |
| 29 | func logsShowCommand(cmd *cobra.Command, args []string) { |
| 30 | if len(args) == 0 { |
| 31 | Print(tr.Tr.Get("Supply a log name.")) |
| 32 | return |
| 33 | } |
| 34 | |
| 35 | name := args[0] |
| 36 | by, err := os.ReadFile(filepath.Join(cfg.LocalLogDir(), name)) |
| 37 | if err != nil { |
| 38 | Exit(tr.Tr.Get("Error reading log: %s", name)) |
| 39 | } |
| 40 | |
| 41 | tracerx.Printf("Reading log: %s", name) |
| 42 | os.Stdout.Write(by) |
| 43 | } |
| 44 | |
| 45 | func logsClearCommand(cmd *cobra.Command, args []string) { |
| 46 | err := os.RemoveAll(cfg.LocalLogDir()) |
no test coverage detected