pub struct SyslogConfig {
pub server_addr: String,
pub server_port: u16,
pub transport: SyslogTransport,
pub protocol: SyslogProtocol,
pub facility: SyslogFacility,
pub app_name: String,
pub hostname: String,
pub process_id: u32,
pub enable_tls: bool,
}Expand description
Syslog client configuration
Fields§
§server_addr: StringSyslog server address
server_port: u16Syslog server port
transport: SyslogTransportTransport protocol
protocol: SyslogProtocolProtocol version
facility: SyslogFacilityFacility code
app_name: StringApplication name
hostname: StringHostname
process_id: u32Process ID
enable_tls: boolEnable TLS for TCP connections
Implementations§
Source§impl SyslogConfig
impl SyslogConfig
Sourcepub fn with_transport(self, transport: SyslogTransport) -> Self
pub fn with_transport(self, transport: SyslogTransport) -> Self
Set transport protocol
Sourcepub fn with_protocol(self, protocol: SyslogProtocol) -> Self
pub fn with_protocol(self, protocol: SyslogProtocol) -> Self
Set protocol version
Sourcepub fn with_facility(self, facility: SyslogFacility) -> Self
pub fn with_facility(self, facility: SyslogFacility) -> Self
Set facility code
Sourcepub fn with_app_name(self, app_name: String) -> Self
pub fn with_app_name(self, app_name: String) -> Self
Set application name
Sourcepub fn socket_addr(&self) -> Result<SocketAddr>
pub fn socket_addr(&self) -> Result<SocketAddr>
Get socket address
Trait Implementations§
Source§impl Clone for SyslogConfig
impl Clone for SyslogConfig
Source§fn clone(&self) -> SyslogConfig
fn clone(&self) -> SyslogConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SyslogConfig
impl RefUnwindSafe for SyslogConfig
impl Send for SyslogConfig
impl Sync for SyslogConfig
impl Unpin for SyslogConfig
impl UnsafeUnpin for SyslogConfig
impl UnwindSafe for SyslogConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more