mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
don't break win32
This commit is contained in:
parent
630072b574
commit
c4e5a130ee
2 changed files with 16 additions and 5 deletions
11
Log.h
11
Log.h
|
@ -8,9 +8,12 @@
|
|||
#include <functional>
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include <syslog.h>
|
||||
#include "Queue.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <syslog.h>
|
||||
#endif
|
||||
|
||||
enum LogLevel
|
||||
{
|
||||
eLogError = 0,
|
||||
|
@ -48,7 +51,7 @@ class Log: public i2p::util::MsgQueue<LogMsg>
|
|||
LogLevel GetLogLevel () { return m_MinLevel; };
|
||||
const std::string& GetFullFilePath () const { return m_FullFilePath; };
|
||||
/** start logging to syslog */
|
||||
void StartSyslog(const std::string & ident, const int facility = LOG_USER);
|
||||
void StartSyslog(const std::string & ident, const int facility);
|
||||
/** stop logging to syslog */
|
||||
void StopSyslog();
|
||||
/** are we logging to syslog right now? */
|
||||
|
@ -126,7 +129,9 @@ inline bool IsLogToFile ()
|
|||
inline void StartSyslog()
|
||||
{
|
||||
StartLog("");
|
||||
g_Log->StartSyslog("i2pd");
|
||||
#ifndef _WIN32
|
||||
g_Log->StartSyslog("i2pd", LOG_USER);
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void StopSyslog()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue