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 committed Dec 10, 2023
1 parent f9c6fcf commit 0dd69c9
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 0dd69c9

Please sign in to comment.