Fixup syslog on windows to compile - logger does nothing
This commit is contained in:
parent
8f24fc5f14
commit
b0b716fc30
@ -24,10 +24,20 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
#include <string>
|
||||
#ifdef __linux__
|
||||
#include <syslog.h>
|
||||
#else
|
||||
inline void syslog(int /*prio*/, const char */*fmt*/, ...) {} // TODO Windows Syslog not supported
|
||||
#define LOG_EMERG 0 /* system is unusable */
|
||||
#define LOG_ALERT 1 /* action must be taken immediately */
|
||||
#define LOG_CRIT 2 /* critical conditions */
|
||||
#define LOG_ERR 3 /* error conditions */
|
||||
#define LOG_WARNING 4 /* warning conditions */
|
||||
#define LOG_NOTICE 5 /* normal but significant condition */
|
||||
#define LOG_INFO 6 /* informational */
|
||||
#define LOG_DEBUG 7 /* debug-level messages */
|
||||
#endif
|
||||
#include "./sink.h"
|
||||
#include "../common.h"
|
||||
#include "../details/log_msg.h"
|
||||
@ -84,5 +94,3 @@ namespace spdlog
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -69,9 +69,7 @@ std::shared_ptr<logger> stderr_logger_st(const std::string& logger_name);
|
||||
|
||||
|
||||
// Create a syslog logger
|
||||
#ifdef __linux__
|
||||
std::shared_ptr<logger> syslog_logger(const std::string& logger_name);
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user