[PR #3603] [MERGED] [client] Use the netbird logger for ice and grpc #20938

Open
opened 2026-08-05 05:07:53 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/3603
Author: @mlsmaycon
Created: 3/29/2025
Status: Merged
Merged: 4/4/2025
Merged by: @mlsmaycon

Base: mainHead: use-same-output-for-ice-and-grpc-logs


📝 Commits (2)

📊 Changes

5 files changed (+40 additions, -4 deletions)

View changed files

📝 client/iface/bind/udp_mux.go (+7 -1)
📝 client/iface/bind/udp_mux_universal.go (+1 -1)
📝 client/internal/peer/ice/agent.go (+5 -0)
📝 formatter/hook/hook.go (+7 -2)
📝 util/log.go (+20 -0)

📄 Description

Describe your changes

set default for hook when caller is not set

based on #3585

gRPC logs:

2025-03-29T16:05:30+01:00 INFO ./caller_not_available:0: 2025/03/29 16:05:30 INFO: [core] [Channel #3]Channel switches to new LB policy "pick_first"
2025-03-29T16:05:30+01:00 INFO ./caller_not_available:0: 2025/03/29 16:05:30 INFO: [core] [Channel #3 SubChannel #4]Subchannel created

ICE logs:

2025-03-29T16:07:28+01:00 INFO ./caller_not_available:0: ice WARNING: 2025/03/29 16:07:28 Discard message from (udp4 host 94.237.63.127:51820), unknown TransactionID 0x2aafb8441436fadf118fe929
2025-03-29T16:07:28+01:00 INFO ./caller_not_available:0: ice TRACE: 16:07:28.987802 agent.go:1105: Inbound STUN (Request) from 94.237.63.127:51820 to udp4 srflx 94.134.125.44:12343 related 0.0.0.0:51000, useCandidate: false
2025-03-29T16:07:28+01:00 INFO ./caller_not_available:0: ice TRACE: 16:07:28.988421 selection.go:133: Inbound STUN (SuccessResponse) from udp4 host 209.94.61.253:51820 to udp4 host 198.19.249.3:51000

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/3603 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 3/29/2025 **Status:** ✅ Merged **Merged:** 4/4/2025 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `use-same-output-for-ice-and-grpc-logs` --- ### 📝 Commits (2) - [`d168f29`](https://github.com/netbirdio/netbird/commit/d168f29c8f6ae14fa087a3b6f575e915ed6b99e6) Use the netbird logger for ice and grpc - [`2ebb04d`](https://github.com/netbirdio/netbird/commit/2ebb04d4ccdaffb80bde5da52ce666d085f5d228) set once ### 📊 Changes **5 files changed** (+40 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `client/iface/bind/udp_mux.go` (+7 -1) 📝 `client/iface/bind/udp_mux_universal.go` (+1 -1) 📝 `client/internal/peer/ice/agent.go` (+5 -0) 📝 `formatter/hook/hook.go` (+7 -2) 📝 `util/log.go` (+20 -0) </details> ### 📄 Description ## Describe your changes set default for hook when caller is not set based on #3585 gRPC logs: ``` 2025-03-29T16:05:30+01:00 INFO ./caller_not_available:0: 2025/03/29 16:05:30 INFO: [core] [Channel #3]Channel switches to new LB policy "pick_first" 2025-03-29T16:05:30+01:00 INFO ./caller_not_available:0: 2025/03/29 16:05:30 INFO: [core] [Channel #3 SubChannel #4]Subchannel created ``` ICE logs: ``` 2025-03-29T16:07:28+01:00 INFO ./caller_not_available:0: ice WARNING: 2025/03/29 16:07:28 Discard message from (udp4 host 94.237.63.127:51820), unknown TransactionID 0x2aafb8441436fadf118fe929 2025-03-29T16:07:28+01:00 INFO ./caller_not_available:0: ice TRACE: 16:07:28.987802 agent.go:1105: Inbound STUN (Request) from 94.237.63.127:51820 to udp4 srflx 94.134.125.44:12343 related 0.0.0.0:51000, useCandidate: false 2025-03-29T16:07:28+01:00 INFO ./caller_not_available:0: ice TRACE: 16:07:28.988421 selection.go:133: Inbound STUN (SuccessResponse) from udp4 host 209.94.61.253:51820 to udp4 host 198.19.249.3:51000 ``` ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 05:07:53 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#20938