pass instance of std::ostream for logging from API

This commit is contained in:
orignal 2014-12-08 16:27:10 -05:00
parent b7d1b74ffa
commit bb05bcf39f
4 changed files with 39 additions and 18 deletions

View file

@ -21,9 +21,12 @@ namespace api
i2p::context.Init ();
}
void StartI2P ()
void StartI2P (std::ostream * logStream)
{
StartLog (i2p::util::filesystem::GetAppName () + ".log");
if (logStream)
StartLog (logStream);
else
StartLog (i2p::util::filesystem::GetAppName () + ".log");
i2p::data::netdb.Start();
LogPrint("NetDB started");
i2p::transport::transports.Start();