summaryrefslogtreecommitdiff
path: root/internal/logging/logging.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/logging/logging.go')
-rw-r--r--internal/logging/logging.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/internal/logging/logging.go b/internal/logging/logging.go
index 71f0334..054b303 100644
--- a/internal/logging/logging.go
+++ b/internal/logging/logging.go
@@ -7,12 +7,6 @@ import (
"github.com/ChausseBenjamin/termpicker/internal/util"
)
-type logSink struct{}
-
-func (l logSink) Write(p []byte) (n int, err error) {
- return len(p), nil
-}
-
func Setup(filepath string) *os.File {
if filepath != "" {
logFile, err := os.Create(filepath)
@@ -28,7 +22,7 @@ func Setup(filepath string) *os.File {
} else {
// Since app is a TUI, logging to stdout/stderr would break the UI
// So we disable it by default
- handler := slog.NewJSONHandler(logSink{}, nil)
+ handler := DiscardHandler{}
slog.SetDefault(slog.New(handler))
return nil
}