1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
use std::path::Path;
use async_trait::async_trait;
use crate::{error::SyRes, Priority, LogStat, LogFacility};
#[async_trait]
pub trait SyslogStd: Send
{
async
fn openlog(ident: Option<&str>, logstat: LogStat, facility: LogFacility) -> SyRes<Self> where Self: Sized;
async fn setlogmask(&self, logmask: i32) -> i32;
async fn closelog(&self);
async fn syslog(&self, pri: Priority, fmt: String);
async fn vsyslog<S: AsRef<str> + Send>(&self, pri: Priority, fmt: S);
}
#[async_trait]
pub trait SyslogExt
{
async
fn openlog_custom<P: AsRef<Path> + Send>(ident: Option<&str>, logstat: LogStat, facility: LogFacility, sock_path: P) -> SyRes<Self> where Self: Sized;
async fn change_identity<I: AsRef<str> + Send>(&self, ident: I);
}