diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-08-19 13:07:45 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-08-27 01:16:14 +0100 |
commit | 13ae9e9a93a1c02fad9475002c0391b86b7ad7bb (patch) | |
tree | a9575d3582c4f40e051c93ae18dded03fdddc432 /other/bootstrap_daemon/src | |
parent | 1f25fc0ae417bfc47dea4966cb5e43689aa88d5c (diff) |
Move logging to a callback.
This removes the global logger (which by the way was deleted when the first tox
was killed, so other toxes would then stop logging). Various bits of the code
now carry a logger or pass it around. It's a bit less transparent now, but now
there is no need to have a global logger, and clients can decide what to log and
where.
Diffstat (limited to 'other/bootstrap_daemon/src')
-rw-r--r-- | other/bootstrap_daemon/src/tox-bootstrapd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/other/bootstrap_daemon/src/tox-bootstrapd.c b/other/bootstrap_daemon/src/tox-bootstrapd.c index e045bb62..14ee9148 100644 --- a/other/bootstrap_daemon/src/tox-bootstrapd.c +++ b/other/bootstrap_daemon/src/tox-bootstrapd.c | |||
@@ -225,14 +225,14 @@ int main(int argc, char *argv[]) | |||
225 | IP ip; | 225 | IP ip; |
226 | ip_init(&ip, enable_ipv6); | 226 | ip_init(&ip, enable_ipv6); |
227 | 227 | ||
228 | Networking_Core *net = new_networking(ip, port); | 228 | Networking_Core *net = new_networking(NULL, ip, port); |
229 | 229 | ||
230 | if (net == NULL) { | 230 | if (net == NULL) { |
231 | if (enable_ipv6 && enable_ipv4_fallback) { | 231 | if (enable_ipv6 && enable_ipv4_fallback) { |
232 | write_log(LOG_LEVEL_WARNING, "Couldn't initialize IPv6 networking. Falling back to using IPv4.\n"); | 232 | write_log(LOG_LEVEL_WARNING, "Couldn't initialize IPv6 networking. Falling back to using IPv4.\n"); |
233 | enable_ipv6 = 0; | 233 | enable_ipv6 = 0; |
234 | ip_init(&ip, enable_ipv6); | 234 | ip_init(&ip, enable_ipv6); |
235 | net = new_networking(ip, port); | 235 | net = new_networking(NULL, ip, port); |
236 | 236 | ||
237 | if (net == NULL) { | 237 | if (net == NULL) { |
238 | write_log(LOG_LEVEL_ERROR, "Couldn't fallback to IPv4. Exiting.\n"); | 238 | write_log(LOG_LEVEL_ERROR, "Couldn't fallback to IPv4. Exiting.\n"); |
@@ -244,7 +244,7 @@ int main(int argc, char *argv[]) | |||
244 | } | 244 | } |
245 | } | 245 | } |
246 | 246 | ||
247 | DHT *dht = new_DHT(net); | 247 | DHT *dht = new_DHT(NULL, net); |
248 | 248 | ||
249 | if (dht == NULL) { | 249 | if (dht == NULL) { |
250 | write_log(LOG_LEVEL_ERROR, "Couldn't initialize Tox DHT instance. Exiting.\n"); | 250 | write_log(LOG_LEVEL_ERROR, "Couldn't initialize Tox DHT instance. Exiting.\n"); |