pub struct Syslog {
pub facility: Facility,
pub process: Option<String>,
pub hostname: Option<String>,
pub level: Level,
pub proto: SyslogProto,
pub server: Option<SyslogAddr>,
pub timeout: Duration,
}Available on crate feature
syslog only.Expand description
Config for syslog sink, see module level doc for usage:
Fields§
§facility: FacilitySyslog facility
process: Option<String>Auto filled current process
hostname: Option<String>Auto filled localhost,
level: Levelmax level of message goes to syslog
proto: SyslogProtoWhen in doubt, use RFC3164
server: Option<SyslogAddr>When None, connect local default unix socket.
timeout: DurationDrop msg when syslog server fail after a timeout, also apply to tcp connect timeout.
Implementations§
Source§impl Syslog
impl Syslog
pub fn new(facility: Facility, level: Level) -> Self
pub fn timeout(self, d: Duration) -> Self
Sourcepub fn process_name(self, name: String) -> Self
pub fn process_name(self, name: String) -> Self
Set process name if you don’t want the default
pub fn unix<P: Into<PathBuf>>(self, p: P) -> Self
pub fn tcp<S: AsRef<str>>(self, remote: S) -> Self
pub fn udp<S: AsRef<str>>(self, local: S, remote: S) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Syslog
impl RefUnwindSafe for Syslog
impl Send for Syslog
impl Sync for Syslog
impl Unpin for Syslog
impl UnwindSafe for Syslog
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