mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 08:14:15 +00:00
* for compatibility - leave --log option with arg
This commit is contained in:
parent
ed44d23afb
commit
deb87f1d4c
@ -46,7 +46,7 @@ namespace config {
|
|||||||
};
|
};
|
||||||
/* list of options, that loose their argument and become simple switch */
|
/* list of options, that loose their argument and become simple switch */
|
||||||
std::set<std::string> boolean_options = {
|
std::set<std::string> boolean_options = {
|
||||||
"daemon", "log", "floodfill", "notransit", "service", "ipv6"
|
"daemon", "floodfill", "notransit", "service", "ipv6"
|
||||||
};
|
};
|
||||||
|
|
||||||
/* this function is a solid piece of shit, remove it after 2.6.0 */
|
/* this function is a solid piece of shit, remove it after 2.6.0 */
|
||||||
@ -110,7 +110,7 @@ namespace config {
|
|||||||
("conf", value<std::string>()->default_value(""), "Path to main i2pd config file (default: try ~/.i2pd/i2p.conf or /var/lib/i2pd/i2p.conf)")
|
("conf", value<std::string>()->default_value(""), "Path to main i2pd config file (default: try ~/.i2pd/i2p.conf or /var/lib/i2pd/i2p.conf)")
|
||||||
("tunconf", value<std::string>()->default_value(""), "Path to config with tunnels list and options (default: try ~/.i2pd/tunnels.cfg or /var/lib/i2pd/tunnels.cfg)")
|
("tunconf", value<std::string>()->default_value(""), "Path to config with tunnels list and options (default: try ~/.i2pd/tunnels.cfg or /var/lib/i2pd/tunnels.cfg)")
|
||||||
("pidfile", value<std::string>()->default_value(""), "Write pidfile to given path")
|
("pidfile", value<std::string>()->default_value(""), "Write pidfile to given path")
|
||||||
("log", value<bool>()->zero_tokens(), "Write logs to file instead stdout")
|
("log", value<std::string>()->default_value(""), "Write logs to file instead stdout")
|
||||||
("logfile", value<std::string>()->default_value(""), "Path to logfile (stdout if not set, autodetect if daemon)")
|
("logfile", value<std::string>()->default_value(""), "Path to logfile (stdout if not set, autodetect if daemon)")
|
||||||
("loglevel", value<std::string>()->default_value("info"), "Set the minimal level of log messages (debug, info, warn, error)")
|
("loglevel", value<std::string>()->default_value("info"), "Set the minimal level of log messages (debug, info, warn, error)")
|
||||||
("host", value<std::string>()->default_value(""), "External IP (deprecated)")
|
("host", value<std::string>()->default_value(""), "External IP (deprecated)")
|
||||||
|
@ -78,7 +78,11 @@ namespace i2p
|
|||||||
i2p::context.Init ();
|
i2p::context.Init ();
|
||||||
|
|
||||||
i2p::config::GetOption("daemon", isDaemon);
|
i2p::config::GetOption("daemon", isDaemon);
|
||||||
i2p::config::GetOption("log", isLogging);
|
// temporary hack
|
||||||
|
std::string logs = "";
|
||||||
|
i2p::config::GetOption("log", logs);
|
||||||
|
if (logs != "")
|
||||||
|
isLogging = true;
|
||||||
|
|
||||||
uint16_t port; i2p::config::GetOption("port", port);
|
uint16_t port; i2p::config::GetOption("port", port);
|
||||||
LogPrint(eLogInfo, "Daemon: accepting incoming connections at port ", port);
|
LogPrint(eLogInfo, "Daemon: accepting incoming connections at port ", port);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user