syslog-rs 6.6.1

A native Rust implementation of the glibc/libc/windows syslog client and windows native log for logging.
Documentation
#![cfg(all(feature = "build_with_queue", not(feature = "async_enabled")))]
extern crate syslog_rs;

use syslog_rs::{formatters::DefaultSyslogFormatter, sync::{DefaultQueueAdapter}, LogFacility, LogStat, Priority, QueuedSyslog};

use syslog_rs::DefaultLocalSyslogDestination;


#[test]
fn test_queue_single_message()
{
    let log = 
            QueuedSyslog
                ::<DefaultQueueAdapter, DefaultSyslogFormatter, DefaultLocalSyslogDestination>
                ::openlog_with(
                Some("queue_single_message"), 
                LogStat::LOG_CONS | LogStat::LOG_NDELAY | LogStat::LOG_PID, 
                LogFacility::LOG_DAEMON,
                DefaultLocalSyslogDestination::new()
                );

    assert_eq!(log.is_ok(), true, "{}", log.err().unwrap());

    let log = log.unwrap();

    let msg1 = format!("test UTF-8 проверка BOM UTF-8");
    let now = std::time::Instant::now();

    log.syslog(Priority::LOG_DEBUG, msg1.into()).unwrap();

    let dur = now.elapsed();
    println!("{:?}", dur);

    let msg2 = format!("test UTF-8  きるさお命泉ぶねりよ日子金れっ");

    let now = std::time::Instant::now();

    log.syslog(Priority::LOG_DEBUG, msg2.into()).unwrap();

    let dur = now.elapsed();
    println!("{:?}", dur);

    let _ = log.closelog();

    return;
}