fix: If debug is false discard logs

The slog change logged to stderr if debug was false.
This screwed up the UI.
This commit is contained in:
Ananth Bhaskararaman 2023-12-10 15:33:17 +05:30 committed by Thomas Buckley-Houston
parent 65344c3f80
commit d7fb6e1045
1 changed files with 2 additions and 1 deletions

View File

@ -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 {