Skip to content

Commit

Permalink
fix: If debug is false discard logs
Browse files Browse the repository at this point in the history
The slog change logged to stderr if debug was false.
This screwed up the UI.
  • Loading branch information
ananthb authored and tombh committed Dec 12, 2023
1 parent 65344c3 commit d7fb6e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion interfacer/src/browsh/browsh.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package browsh
import (
"encoding/base64"
"fmt"
"io"
"log/slog"
"net/url"
"os"
Expand Down Expand Up @@ -44,7 +45,7 @@ var (
)

func setupLogging() {
out := os.Stderr
out := io.Discard
if *isDebug {
dir, err := os.Getwd()
if err != nil {
Expand Down

0 comments on commit d7fb6e1

Please sign in to comment.