Skip to content

Commit dc96c6b

Browse files
committed
Decrease log spam on stream startup: LOG_F(INFO, ...) and LOG_F(WARNING, ...) → LOG_F(1, ...) (debug level)
1 parent e5ab85c commit dc96c6b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/netinterfaces.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ std::vector<lsl::netif> lsl::get_local_interfaces() {
8686
for (auto *addr = ifs; addr != nullptr; addr = addr->ifa_next) {
8787
// No address? Skip.
8888
if (addr->ifa_addr == nullptr) continue;
89-
LOG_F(INFO, "netif '%s' (status: %d, multicast: %d, broadcast: %d)", addr->ifa_name,
89+
LOG_F(1, "netif '%s' (status: %d, multicast: %d, broadcast: %d)", addr->ifa_name,
9090
addr->ifa_flags & IFF_UP, addr->ifa_flags & IFF_MULTICAST,
9191
addr->ifa_flags & IFF_BROADCAST);
9292
// Interface doesn't support multicast? Skip.
@@ -99,10 +99,10 @@ std::vector<lsl::netif> lsl::get_local_interfaces() {
9999
if (addr->ifa_addr->sa_family == AF_INET) {
100100
if_.addr = asio::ip::make_address_v4(
101101
ntohl(reinterpret_cast<sockaddr_in *>(addr->ifa_addr)->sin_addr.s_addr));
102-
LOG_F(INFO, "\tIPv4 addr: %x", if_.addr.to_v4().to_uint());
102+
LOG_F(1, "\tIPv4 addr: %x", if_.addr.to_v4().to_uint());
103103
} else if (addr->ifa_addr->sa_family == AF_INET6) {
104104
if_.addr = sinaddr_to_asio(reinterpret_cast<sockaddr_in6 *>(addr->ifa_addr));
105-
LOG_F(INFO, "\tIPv6 addr: %s", if_.addr.to_string().c_str());
105+
LOG_F(1, "\tIPv6 addr: %s", if_.addr.to_string().c_str());
106106
} else
107107
continue;
108108

src/udp_server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ udp_server::udp_server(stream_info_impl_p info, asio::io_context &io, ip::addres
7878
socket_->set_option(
7979
ip::multicast::join_group(addr.to_v6(), if_.addr.to_v6().scope_id()), err);
8080
if (err)
81-
LOG_F(WARNING, "Could not bind multicast responder for %s to interface %s (%s)",
81+
LOG_F(1, "Could not bind multicast responder for %s to interface %s (%s)",
8282
addr.to_string().c_str(), if_.addr.to_string().c_str(), err.message().c_str());
8383
else
8484
joined_anywhere = true;

0 commit comments

Comments
 (0)