From d7fb6e1045ac326f8844b1dccad4f80ded66f2e7 Mon Sep 17 00:00:00 2001 From: Ananth Bhaskararaman Date: Sun, 10 Dec 2023 15:33:17 +0530 Subject: [PATCH] fix: If debug is false discard logs The slog change logged to stderr if debug was false. This screwed up the UI. --- interfacer/src/browsh/browsh.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interfacer/src/browsh/browsh.go b/interfacer/src/browsh/browsh.go index 18f52fb5..958466ee 100644 --- a/interfacer/src/browsh/browsh.go +++ b/interfacer/src/browsh/browsh.go @@ -3,6 +3,7 @@ package browsh import ( "encoding/base64" "fmt" + "io" "log/slog" "net/url" "os" @@ -44,7 +45,7 @@ var ( ) func setupLogging() { - out := os.Stderr + out := io.Discard if *isDebug { dir, err := os.Getwd() if err != nil {