add syslog logging option

This commit is contained in:
Jeff Becker 2016-03-26 09:40:19 -04:00
parent 53b7eba31a
commit 5261a3e845
No known key found for this signature in database
GPG key ID: AB950234D6EA286B
4 changed files with 73 additions and 7 deletions

View file

@ -159,7 +159,10 @@ namespace i2p
if (isDaemon && (logs == "" || logs == "stdout"))
logs = "file";
if (logs == "file") {
if (logs == "syslog") {
// use syslog only no stdout
StartSyslog();
} else if (logs == "file") {
if (logfile == "")
logfile = i2p::fs::DataDirPath("i2pd.log");
StartLog (logfile);