Add syslog support.
This commit is contained in:
parent
e97cd98f90
commit
faf793b0aa
5 changed files with 36 additions and 8 deletions
11
src/App.cpp
11
src/App.cpp
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue