Permalink
Browse files

dhtchat: add logging support

  • Loading branch information...
aberaud committed Dec 22, 2018
1 parent 0c1e7d2 commit 92979fa96a3b1178b0cebcb68ade3c9fbdc73b5c
Showing with 9 additions and 0 deletions.
  1. +9 −0 tools/dhtchat.cpp
@@ -64,6 +64,15 @@ main(int argc, char **argv)
try {
dht.run(params.port, dht::crypto::generateIdentity("DHT Chat Node"), true, params.network);

if (params.log) {
if (params.syslog)
log::enableSyslog(dht, "dhtnode");
else if (not params.logfile.empty())
log::enableFileLogging(dht, params.logfile);
else
log::enableLogging(dht);
}

if (not params.bootstrap.first.empty())
dht.bootstrap(params.bootstrap.first.c_str(), params.bootstrap.second.c_str());

0 comments on commit 92979fa

Please sign in to comment.