Added support for syslog in FreeBSD
This commit is contained in:
parent
aa0f62292b
commit
5b2bd79b7e
@ -108,7 +108,7 @@ void async_example()
|
|||||||
//syslog example (linux/osx only)
|
//syslog example (linux/osx only)
|
||||||
void syslog_example()
|
void syslog_example()
|
||||||
{
|
{
|
||||||
#if defined (__linux__) || defined(__APPLE__)
|
#if defined (__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||||
std::string ident = "spdlog-example";
|
std::string ident = "spdlog-example";
|
||||||
auto syslog_logger = spd::syslog_logger("syslog", ident, LOG_PID);
|
auto syslog_logger = spd::syslog_logger("syslog", ident, LOG_PID);
|
||||||
syslog_logger->warn("This is warning that will end up in syslog. This is Linux only!");
|
syslog_logger->warn("This is warning that will end up in syslog. This is Linux only!");
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__APPLE__)
|
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
|
||||||
|
|
||||||
#include <spdlog/sinks/sink.h>
|
#include <spdlog/sinks/sink.h>
|
||||||
#include <spdlog/common.h>
|
#include <spdlog/common.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user