Struct syslog::Logger
[−]
[src]
pub struct Logger { /* fields omitted */ }
Main logging structure
Methods
impl Logger
[src]
fn format_3164<T: Display>(&self, severity: Severity, message: T) -> String
format a message as a RFC 3164 log message
fn format_5424_structured_data(&self, data: StructuredData) -> String
format RFC 5424 structured data as ([id (name="value")*])*
fn format_5424<T: Display>(
&self,
severity: Severity,
message_id: i32,
data: StructuredData,
message: T
) -> String
&self,
severity: Severity,
message_id: i32,
data: StructuredData,
message: T
) -> String
format a message as a RFC 5424 log message
fn send<T: Display>(
&self,
severity: Severity,
message: T
) -> Result<usize, Error>
&self,
severity: Severity,
message: T
) -> Result<usize, Error>
Sends a basic log message of the format <priority> message
fn send_3164<T: Display>(
&self,
severity: Severity,
message: T
) -> Result<usize, Error>
&self,
severity: Severity,
message: T
) -> Result<usize, Error>
Sends a RFC 3164 log message
fn send_5424<T: Display>(
&self,
severity: Severity,
message_id: i32,
data: StructuredData,
message: T
) -> Result<usize, Error>
&self,
severity: Severity,
message_id: i32,
data: StructuredData,
message: T
) -> Result<usize, Error>
Sends a RFC 5424 log message
fn send_raw(&self, message: &[u8]) -> Result<usize, Error>
Sends a message directly, without any formatting
fn emerg<T: Display>(&self, message: T) -> Result<usize, Error>
fn alert<T: Display>(&self, message: T) -> Result<usize, Error>
fn crit<T: Display>(&self, message: T) -> Result<usize, Error>
fn err<T: Display>(&self, message: T) -> Result<usize, Error>
fn warning<T: Display>(&self, message: T) -> Result<usize, Error>
fn notice<T: Display>(&self, message: T) -> Result<usize, Error>
fn info<T: Display>(&self, message: T) -> Result<usize, Error>
fn debug<T: Display>(&self, message: T) -> Result<usize, Error>
fn process_name(&self) -> &String
fn process_id(&self) -> i32
fn set_process_name(&mut self, name: String)
fn set_process_id(&mut self, id: i32)
fn set_facility(&mut self, facility: Facility)
Changes facility