Add syslog support.

This commit is contained in:
XMRig 2017-06-25 02:04:59 +03:00
parent e97cd98f90
commit faf793b0aa
5 changed files with 36 additions and 8 deletions

View file

@ -40,6 +40,11 @@
#include "workers/Workers.h"
#ifdef HAVE_SYSLOG_H
# include "log/SysLog.h"
#endif
App *App::m_self = nullptr;
@ -63,6 +68,12 @@ App::App(int argc, char **argv) :
Log::add(new FileLog(m_options->logFile()));
}
# ifdef HAVE_SYSLOG_H
if (m_options->syslog()) {
Log::add(new SysLog());
}
# endif
m_network = new Network(m_options);
uv_signal_init(uv_default_loop(), &m_signal);