Skip to content

Commit 4f7ad8a

Browse files
author
Matthew Fisher
committed
fix(logger): reduce severity of log failure
Sending a log to an external server should not kill the logger on an error. For example, if the host is down or unavailable, the logger should just log that the error message has been lost, but carry on.
1 parent 3cc3baf commit 4f7ad8a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

logger/drain/drain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func SendToDrain(m string, drain string) error {
2626
func sendToSyslogDrain(m string, drain string) error {
2727
conn, err := net.Dial("udp", drain)
2828
if err != nil {
29-
log.Fatal(err)
29+
log.Print(err)
3030
}
3131
defer conn.Close()
3232
fmt.Fprintf(conn, m)

0 commit comments

Comments
 (0)