spdlog icon indicating copy to clipboard operation
spdlog copied to clipboard

Add syslog_formatter

Open sivachandran opened this issue 1 year ago • 0 comments

The formatter enables remote(udp/tcp) syslog sink

Example:

    // run "nc -klu 514" to receive the syslog message
    spdlog::sinks::udp_sink_config udp_sink_config("127.0.0.1", 514);
    auto udp_logger = spdlog::udp_logger_mt("udp_logger", udp_sink_config);
    spdlog::syslog_formatter syslog_formatter(spdlog::facility::user, "localhost", "example");
    udp_logger->set_formatter(syslog_formatter.clone());
    udp_logger->info("this message will be logged in local syslog receiver");

sivachandran avatar Aug 11 '24 12:08 sivachandran