diff --git a/cmd/newscanoe/main.go b/cmd/newscanoe/main.go index be142cb..136ebaa 100644 --- a/cmd/newscanoe/main.go +++ b/cmd/newscanoe/main.go @@ -2,6 +2,7 @@ package main import ( "flag" + "io" "log" "os" "os/signal" @@ -26,7 +27,9 @@ func main() { flag.BoolVar(&display.DebugMode, "d", false, "enable debug mode") flag.Parse() - //TODO discard logs if debug mode is disabled + if !display.DebugMode { + log.SetOutput(io.Discard) + } origTermios := termios.EnableRawMode(os.Stdin.Fd()) defer termios.DisableRawMode(os.Stdin.Fd(), origTermios)