mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
log to file if daemon only
This commit is contained in:
parent
334c92bb49
commit
8aaaf26a9e
11
Daemon.cpp
11
Daemon.cpp
@ -66,15 +66,20 @@ namespace i2p
|
||||
{
|
||||
// initialize log
|
||||
if (isLogging)
|
||||
{
|
||||
if (isDaemon)
|
||||
{
|
||||
std::string logfile_path = i2p::util::filesystem::GetDataDir().string();
|
||||
#ifndef _WIN32
|
||||
#ifndef _WIN32
|
||||
logfile_path.append("/debug.log");
|
||||
#else
|
||||
#else
|
||||
logfile_path.append("\\debug.log");
|
||||
#endif
|
||||
#endif
|
||||
StartLog (logfile_path);
|
||||
}
|
||||
else
|
||||
StartLog (""); // write to stdout
|
||||
}
|
||||
|
||||
d.httpServer = new i2p::util::HTTPServer(i2p::util::config::GetArg("-httpport", 7070));
|
||||
d.httpServer->Start();
|
||||
|
Loading…
Reference in New Issue
Block a user