Skip to content

Commit

Permalink
fix: No panic on log failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshoulahan committed Nov 17, 2022
1 parent cee1c02 commit b0f0a69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/session/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package session
import (
"fmt"
"io"
"log"
"strings"
)

Expand All @@ -14,6 +15,6 @@ func writeLog(w io.Writer, leader, sessionID, line string) {
}

if _, err := fmt.Fprintf(w, "%v[%v]: %v\n", leader, sessionID, line); err != nil {
panic(err)
log.Printf("gluon: failed to write log: %v", err)
}
}

0 comments on commit b0f0a69

Please sign in to comment.