Skip to content

Commit

Permalink
fix: remove salt-live debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kpetremann committed May 14, 2023
1 parent 1c0f108 commit 700152b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 10 additions & 7 deletions cmd/salt-live/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@ func printVersion() {
}

func main() {
f, err := tea.LogToFile("debug.log", "debug")
if err != nil {
fmt.Println("fatal:", err)
os.Exit(1)
}
defer f.Close()

maxItems := flag.Int("max-events", 1000, "maximum events to keep in memory")
bufferSize := flag.Int("buffer-size", 1000, "buffer size in number of events")
filter := flag.String("hard-filter", "", "filter when received (filtered out events are discarded forever)")
versionCmd := flag.Bool("version", false, "print version")
debug := flag.Bool("debug", false, "enable debug mode (log to debug.log)")
flag.Parse()

if *debug {
f, err := tea.LogToFile("debug.log", "debug")
if err != nil {
fmt.Println("fatal:", err)
os.Exit(1)
}
defer f.Close()
}

if *versionCmd {
printVersion()
return
Expand Down
2 changes: 0 additions & 2 deletions internal/tui/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,6 @@ func (m model) View() string {
content = append(content, sideInfos)
}

log.Println("width total:", m.terminalWidth, "- left:", m.eventList.Width(), "- right:", m.rawView.Width)

/*
Final rendering
*/
Expand Down

0 comments on commit 700152b

Please sign in to comment.