Automatically delete old messages
This commit is contained in:
@ -32,13 +32,17 @@ pub struct LogMsg {
|
||||
}
|
||||
|
||||
impl LogMsg {
|
||||
pub fn new(service: String, message: String, hostname: String) -> Self {
|
||||
pub fn new(
|
||||
service: impl Into<String>,
|
||||
message: impl Into<String>,
|
||||
hostname: impl Into<String>,
|
||||
) -> Self {
|
||||
Self {
|
||||
time: Some(Local::now()),
|
||||
severity: Severity::Error,
|
||||
service,
|
||||
message,
|
||||
hostname,
|
||||
service: service.into(),
|
||||
message: message.into(),
|
||||
hostname: hostname.into(),
|
||||
file: None,
|
||||
line: None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user