Skip to main content

syslog_rs/sync/
mod.rs

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