Skip to main content

syslog_rs/sync/
mod.rs

1
2
3
4//-- SYNC QUEUE --
5
6/// A syslog intance which uses an MPSC channels.
7#[cfg(feature = "build_with_queue")]
8pub mod syslog_sync_queue;
9
10/// A queue adapter based on the `crossbeam` MPSC.
11#[cfg(all(feature = "build_with_queue", not(feature = "async_embedded")))]
12pub(crate) mod crossbeam_queue_adapter;
13
14/// A streamer for the syslog.
15pub mod syslog_stream;
16
17/// A set of different syslog types of client.
18/// 
19/// - a shared (SyShared)
20/// - a thread local (SyThreadLocal)
21/// - a queued (SyQueue)
22/// 
23/// And implementation of (Syslog)
24pub mod syslog_sync;
25
26/// Internal logic of the syslog client. (UNIX)
27//#[cfg(target_family = "unix")]
28pub(crate) mod syslog_sync_internal;
29
30//#[cfg(target_family = "windows")]
31//pub mod syslog_sync_internal_windows;
32
33// A single threaded or thread_local syslog.
34//#[cfg(feature = "build_with_thread_local")]
35//pub mod syslog_threadlocal;
36
37//pub mod syslog;
38
39//-- SYNC SOCKET --
40
41/// A sockets (communication).
42pub(crate) mod socket;
43
44
45#[cfg(all(feature = "build_with_queue", not(feature = "async_embedded")))]
46pub(crate) use crossbeam_queue_adapter as q_adapter;
47
48#[cfg(all(feature = "async_embedded", feature = "build_with_queue"))]
49pub(crate) use crate::a_sync::async_queue_adapter::q_adapter as q_adapter;
50
51#[cfg(all(feature = "build_with_queue"))]
52pub use q_adapter::DefaultQueueAdapter;
53
54/// Exposing API for streaming to syslog.
55pub use syslog_stream::
56{
57    SyStream, SyStreamPri, SyStreamSyslogApi, SyStreamPriWarning, SyStreamPriNotice, SyStreamPriInfo,
58    SyStreamPriEmerg, SyStreamPriCrit, SyStreamPriAlert, SyStreamPriDebug, SyStreamPriErr
59};
60
61//#[cfg(target_family = "unix")]
62pub(crate) use syslog_sync_internal::LogItems;
63
64
65#[cfg(target_family = "unix")]
66use crate::SyslogLocal;
67
68#[cfg(target_family = "windows")]
69use crate::WindowsEvent;
70
71
72#[cfg(target_family = "unix")]
73pub type DefaultLocalSyslogDestination = SyslogLocal;
74#[cfg(target_family = "windows")]
75pub type DefaultLocalSyslogDestination = WindowsEvent;
76
77
78//#[cfg(target_family = "windows")]
79//pub(crate) use syslog_sync_internal_windows::LogItems;