mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Filter out annoying log statements in unit tests.
These may be useful when debugging toxcore locally, but are not useful in unit tests.
This commit is contained in:
parent
e775b5533b
commit
c38d3de604
|
@ -51,6 +51,11 @@ static void print_debug_log(Tox *m, TOX_LOG_LEVEL level, const char *path, uint3
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strncmp(message, "Bound successfully to ", strlen("Bound successfully to ")) ||
|
||||||
|
strncmp(message, "Found node in LAN: ", strlen("Found node in LAN: "))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t index = user_data ? *(uint32_t *)user_data : 0;
|
uint32_t index = user_data ? *(uint32_t *)user_data : 0;
|
||||||
const char *file = strrchr(path, '/');
|
const char *file = strrchr(path, '/');
|
||||||
file = file ? file + 1 : path;
|
file = file ? file + 1 : path;
|
||||||
|
|
|
@ -356,7 +356,7 @@ static int handle_LANdiscovery(void *object, IP_Port source, const uint8_t *pack
|
||||||
|
|
||||||
char ip_str[IP_NTOA_LEN] = { 0 };
|
char ip_str[IP_NTOA_LEN] = { 0 };
|
||||||
ip_ntoa(&source.ip, ip_str, sizeof(ip_str));
|
ip_ntoa(&source.ip, ip_str, sizeof(ip_str));
|
||||||
LOGGER_INFO(dht->log, "Found node in LAN: %s", ip_str);
|
LOGGER_DEBUG(dht->log, "Found node in LAN: %s", ip_str);
|
||||||
|
|
||||||
DHT_bootstrap(dht, source, packet + 1);
|
DHT_bootstrap(dht, source, packet + 1);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user