Skip to content

Commit

Permalink
Use correct logger.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbruens committed Dec 13, 2024
1 parent f5d9ac3 commit e0547f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions service/udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func (h *associationHandler) Handle(clientAssociation net.Conn, connMetrics UDPA

targetConn, err := h.targetConnFactory()
if err != nil {
slog.Error("UDP: failed to create target connection", slog.Any("err", err))
h.logger.Error("UDP: failed to create target connection", slog.Any("err", err))
return
}

Expand All @@ -317,10 +317,10 @@ func (h *associationHandler) Handle(clientAssociation net.Conn, connMetrics UDPA
connError := func() *onet.ConnectionError {
defer func() {
if r := recover(); r != nil {
slog.Error("Panic in UDP loop. Continuing to listen.", "err", r)
h.logger.Error("Panic in UDP loop. Continuing to listen.", "err", r)
debug.PrintStack()
}
slog.LogAttrs(nil, slog.LevelDebug, "UDP: Done", slog.String("address", clientAssociation.RemoteAddr().String()))
h.logger.LogAttrs(nil, slog.LevelDebug, "UDP: Done", slog.String("address", clientAssociation.RemoteAddr().String()))
}()

cipherData := cipherBuf[:clientProxyBytes]
Expand Down

0 comments on commit e0547f2

Please sign in to comment.