write to log through the separate thread

This commit is contained in:
orignal 2016-11-17 15:46:28 -05:00
parent 164d3566e3
commit d91691c344
4 changed files with 75 additions and 47 deletions

View file

@ -47,7 +47,7 @@ namespace api
i2p::log::Logger().SendTo (logStream);
else
i2p::log::Logger().SendTo (i2p::fs::DataDirPath (i2p::fs::GetAppName () + ".log"));
i2p::log::Logger().Ready();
i2p::log::Logger().Start ();
LogPrint(eLogInfo, "API: starting NetDB");
i2p::data::netdb.Start();
LogPrint(eLogInfo, "API: starting Transports");
@ -65,6 +65,7 @@ namespace api
i2p::transport::transports.Stop();
LogPrint(eLogInfo, "API: stopping NetDB");
i2p::data::netdb.Stop();
i2p::log::Logger().Stop ();
}
void RunPeerTest ()