From b60ed5becf99025abf66dc6e043fe8d75ac67088 Mon Sep 17 00:00:00 2001 From: Michael Lohrer Date: Tue, 2 Jan 2024 14:02:29 -0500 Subject: [PATCH] Added better log messages for zeroconf --- amplipi/zeroconf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/amplipi/zeroconf.py b/amplipi/zeroconf.py index f7115fe79..1d0c8a8e8 100644 --- a/amplipi/zeroconf.py +++ b/amplipi/zeroconf.py @@ -120,12 +120,13 @@ def _advertise_service(port: int, ok: Callable) -> None: ip_addr, mac_addr, good_iface = _find_best_iface(ok) if not ip_addr: - log.warning('is this running on AmpliPi?') # Fallback to any hosted ip on this device. # This will be resolved to an ip address by the advertisement ip_addr = '0.0.0.0' + log.warning(f'No valid network interface found, advertising on {ip_addr}.') else: - log.debug('Found IP address %s on interface %s', ip_addr, good_iface) + log.debug(f'Found IP address {ip_addr} on interface {good_iface}') + log.info(f'Advertising AmpliPi service on {ip_addr}:{port} (interface={good_iface})') if port != 80: url += f':{port}'