Decouple logging and daemonization

This commit is contained in:
Cameron Norman 2014-10-25 18:25:03 -07:00
parent 2308f854b1
commit 65c13f1758

View File

@ -83,8 +83,6 @@ namespace i2p
{
// initialize log
if (isLogging)
{
if (isDaemon)
{
std::string logfile_path = IsService () ? "/var/log" : i2p::util::filesystem::GetDataDir().string();
#ifndef _WIN32
@ -94,9 +92,6 @@ namespace i2p
#endif
StartLog (logfile_path);
}
else
StartLog (""); // write to stdout
}
d.httpServer = new i2p::util::HTTPServer(i2p::util::config::GetArg("-httpport", 7070));
d.httpServer->Start();