Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit930c467

Browse files
committed
chore: nodeUpdater logging
1 parentf86f281 commit930c467

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

‎tailnet/configmaps.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ func (c *configMaps) configLoop() {
137137
c.Wait()
138138
}
139139
ifc.closing {
140+
c.logger.Debug(context.Background(),"closing configMaps configLoop")
140141
return
141142
}
142143
// queue up the reconfiguration actions we will take while we have
@@ -146,19 +147,22 @@ func (c *configMaps) configLoop() {
146147
ifc.derpMapDirty {
147148
derpMap:=c.derpMapLocked()
148149
actions=append(actions,func() {
150+
c.logger.Debug(context.Background(),"updating engine DERP map",slog.F("derp_map",derpMap))
149151
c.engine.SetDERPMap(derpMap)
150152
})
151153
}
152154
ifc.netmapDirty {
153155
nm:=c.netMapLocked()
154156
actions=append(actions,func() {
157+
c.logger.Debug(context.Background(),"updating engine network map",slog.F("network_map",nm))
155158
c.engine.SetNetworkMap(nm)
156159
c.reconfig(nm)
157160
})
158161
}
159162
ifc.filterDirty {
160163
f:=c.filterLocked()
161164
actions=append(actions,func() {
165+
c.logger.Debug(context.Background(),"updating engine filter",slog.F("filter",f))
162166
c.engine.SetFilter(f)
163167
})
164168
}

‎tailnet/node.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func (u *nodeUpdater) updateLoop() {
5252
u.Wait()
5353
}
5454
ifu.closing {
55+
u.logger.Debug(context.Background(),"closing nodeUpdater updateLoop")
5556
return
5657
}
5758
node:=u.nodeLocked()
@@ -68,6 +69,7 @@ func (u *nodeUpdater) updateLoop() {
6869
}
6970

7071
u.L.Unlock()
72+
u.logger.Debug(context.Background(),"calling nodeUpdater callback",slog.F("node",node))
7173
u.callback(node)
7274
u.L.Lock()
7375
}
@@ -126,6 +128,8 @@ func (u *nodeUpdater) setNetInfo(ni *tailcfg.NetInfo) {
126128
ifu.preferredDERP!=ni.PreferredDERP {
127129
dirty=true
128130
u.preferredDERP=ni.PreferredDERP
131+
u.logger.Debug(context.Background(),"new preferred DERP",
132+
slog.F("preferred_derp",u.preferredDERP))
129133
}
130134
if!maps.Equal(u.derpLatency,ni.DERPLatency) {
131135
dirty=true

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp