ipn: tag and test for grinder log lines (#711)

Signed-off-by: Wendi <wendi.yu@yahoo.ca>
This commit is contained in:
Wendi Yu
2020-08-25 12:42:54 -06:00
committed by GitHub
parent cd7bc02ab1
commit a3fb422a39
4 changed files with 204 additions and 0 deletions
+3
View File
@@ -776,7 +776,9 @@ func (b *LocalBackend) parseWgStatus(s *wgengine.Status) (ret EngineStatus) {
ret.WBytes += p.TxBytes
}
if len(peerStats) > 0 {
// [GRINDER STATS LINE] - please don't remove (used for log parsing)
b.keyLogf("peer keys: %s", strings.Join(peerKeys, " "))
// [GRINDER STATS LINE] - please don't remove (used for log parsing)
b.logf("v%v peers: %v", version.LONG, strings.Join(peerStats, " "))
}
return ret
@@ -827,6 +829,7 @@ func (b *LocalBackend) SetPrefs(new *Prefs) {
}
}
// [GRINDER STATS LINE] - please don't remove (used for log parsing)
b.logf("SetPrefs: %v", new.Pretty())
if old.ShieldsUp != new.ShieldsUp || hostInfoChanged {