mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-10 19:38:28 +01:00
Decouple logging and daemonization
This commit is contained in:
parent
2308f854b1
commit
65c13f1758
1 changed files with 4 additions and 9 deletions
|
@ -83,8 +83,6 @@ namespace i2p
|
||||||
{
|
{
|
||||||
// initialize log
|
// initialize log
|
||||||
if (isLogging)
|
if (isLogging)
|
||||||
{
|
|
||||||
if (isDaemon)
|
|
||||||
{
|
{
|
||||||
std::string logfile_path = IsService () ? "/var/log" : i2p::util::filesystem::GetDataDir().string();
|
std::string logfile_path = IsService () ? "/var/log" : i2p::util::filesystem::GetDataDir().string();
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
|
@ -94,9 +92,6 @@ namespace i2p
|
||||||
#endif
|
#endif
|
||||||
StartLog (logfile_path);
|
StartLog (logfile_path);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
StartLog (""); // write to stdout
|
|
||||||
}
|
|
||||||
|
|
||||||
d.httpServer = new i2p::util::HTTPServer(i2p::util::config::GetArg("-httpport", 7070));
|
d.httpServer = new i2p::util::HTTPServer(i2p::util::config::GetArg("-httpport", 7070));
|
||||||
d.httpServer->Start();
|
d.httpServer->Start();
|
||||||
|
|
Loading…
Add table
Reference in a new issue