summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-08-15 01:28:13 +0200
committerGitHub <noreply@github.com>2023-08-15 01:28:13 +0200
commit6d665a94eaad4530d84dcc2adf1f91fa2ff6e502 (patch)
tree087b83d6e1ef1b9e3f4d217c1ffd784227f37aeb
parentMerge pull request #11273 from t895/setup-completion (diff)
parentRevert "Silence nifm spam" (diff)
downloadyuzu-6d665a94eaad4530d84dcc2adf1f91fa2ff6e502.tar
yuzu-6d665a94eaad4530d84dcc2adf1f91fa2ff6e502.tar.gz
yuzu-6d665a94eaad4530d84dcc2adf1f91fa2ff6e502.tar.bz2
yuzu-6d665a94eaad4530d84dcc2adf1f91fa2ff6e502.tar.lz
yuzu-6d665a94eaad4530d84dcc2adf1f91fa2ff6e502.tar.xz
yuzu-6d665a94eaad4530d84dcc2adf1f91fa2ff6e502.tar.zst
yuzu-6d665a94eaad4530d84dcc2adf1f91fa2ff6e502.zip
-rw-r--r--src/core/internal_network/network.cpp8
-rw-r--r--src/core/internal_network/network_interface.cpp9
2 files changed, 15 insertions, 2 deletions
diff --git a/src/core/internal_network/network.cpp b/src/core/internal_network/network.cpp
index 28f89c599..bda9fa2e0 100644
--- a/src/core/internal_network/network.cpp
+++ b/src/core/internal_network/network.cpp
@@ -476,7 +476,13 @@ NetworkInstance::~NetworkInstance() {
std::optional<IPv4Address> GetHostIPv4Address() {
const auto network_interface = Network::GetSelectedNetworkInterface();
if (!network_interface.has_value()) {
- LOG_DEBUG(Network, "GetSelectedNetworkInterface returned no interface");
+ // Only print the error once to avoid log spam
+ static bool print_error = true;
+ if (print_error) {
+ LOG_ERROR(Network, "GetSelectedNetworkInterface returned no interface");
+ print_error = false;
+ }
+
return {};
}
diff --git a/src/core/internal_network/network_interface.cpp b/src/core/internal_network/network_interface.cpp
index 4c909a6d3..7c37f660b 100644
--- a/src/core/internal_network/network_interface.cpp
+++ b/src/core/internal_network/network_interface.cpp
@@ -200,7 +200,14 @@ std::optional<NetworkInterface> GetSelectedNetworkInterface() {
});
if (res == network_interfaces.end()) {
- LOG_DEBUG(Network, "Couldn't find selected interface \"{}\"", selected_network_interface);
+ // Only print the error once to avoid log spam
+ static bool print_error = true;
+ if (print_error) {
+ LOG_ERROR(Network, "Couldn't find selected interface \"{}\"",
+ selected_network_interface);
+ print_error = false;
+ }
+
return std::nullopt;
}