From: Jason A. Donenfeld Date: Tue, 9 Feb 2021 14:25:43 +0000 (+0100) Subject: device: do not log on idempotent device state change X-Git-Tag: 0.0.20210212~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d6e76fdbd6bae64a08662eb19d3634adb4881155;p=thirdparty%2Fwireguard-go.git device: do not log on idempotent device state change Part of being actually idempotent is that we shouldn't penalize code that takes advantage of this property with a log splat. Signed-off-by: Jason A. Donenfeld --- diff --git a/device/device.go b/device/device.go index b93ad22..895c9db 100644 --- a/device/device.go +++ b/device/device.go @@ -160,7 +160,6 @@ func (device *Device) changeState(want deviceState) { } switch want { case old: - device.log.Verbosef("Interface already in state %s", want) return case deviceStateUp: atomic.StoreUint32(&device.state.state, uint32(deviceStateUp))