mirror of https://github.com/jetkvm/kvm.git
Improve interface state log message
This commit is contained in:
parent
efde7dcc3d
commit
a467793f39
|
@ -174,11 +174,12 @@ func (s *NetworkInterfaceState) update() (DhcpTargetState, error) {
|
|||
}
|
||||
|
||||
if changed {
|
||||
scopedLogger := s.l.With().Str("iface", s.interfaceName).Logger()
|
||||
if interfaceGoingUp {
|
||||
s.l.Info().Msg("interface state transitioned to up")
|
||||
scopedLogger.Info().Msg("interface state transitioned to up")
|
||||
dhcpTargetState = DhcpTargetStateRenew
|
||||
} else if interfaceGoingDown {
|
||||
s.l.Info().Msg("interface state transitioned to down")
|
||||
scopedLogger.Info().Msg("interface state transitioned to down")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue