zones: add structured logs to zone scanning

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-09-07 17:57:23 +00:00
parent 159ccf59ac
commit 2016b27707
3 changed files with 38 additions and 8 deletions
+5
View File
@@ -71,6 +71,11 @@ func (m *Machine) setID() error {
func (m *Machine) scan(opts *ScanOptions) error {
for i := 0; i < RingsCount; i++ {
if err := m.tryApplyWireguardConfig(i); err != nil {
m.error(err).
WithField("subsystem", "wireguard").
WithField("node", m.Name).
WithField("ring", i).
Print()
return err
}
}