Joedb 10.3.0
The Journal-Only Embedded Database
Loading...
Searching...
No Matches
Posix_Logger.cpp
Go to the documentation of this file.
2
3#include <string>
4
5#include <syslog.h>
6
7namespace joedb
8{
9 Posix_Logger::Posix_Logger(std::string tag): tag(std::move(tag))
10 {
11 }
12
13 void Posix_Logger::log(const std::string &message) noexcept
14 {
15 if (tag.empty())
16 syslog(LOG_INFO, "%s", message.c_str());
17 else
18 syslog(LOG_INFO, "%s: %s", tag.c_str(), message.c_str());
19 }
20}
void log(const std::string &message) noexcept override
Posix_Logger(std::string tag)