mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-29 01:29:35 +08:00
@@ -5,7 +5,7 @@ CXX_DEBUG_FLAGS= -g
|
||||
|
||||
|
||||
all: example bench
|
||||
debug: example-debug bench-debug
|
||||
debug: example-debug bench-debug
|
||||
|
||||
example: example.cpp
|
||||
$(CXX) example.cpp -o example $(CXXFLAGS) $(CXX_RELEASE_FLAGS)
|
||||
|
@@ -86,7 +86,8 @@ int main(int, char* [])
|
||||
// syslog example
|
||||
//
|
||||
#ifdef __linux__
|
||||
auto syslog_logger = spd::syslog_logger("syslog");
|
||||
std::string ident = "my_ident";
|
||||
auto syslog_logger = spd::syslog_logger("syslog", ident, spd::sinks::syslog::option::PID | spd::sinks::syslog::option::PERROR, "mail" );
|
||||
syslog_logger->warn("This is warning that will end up in syslog. This is Linux only!");
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user