Message

We need a message to send messages for writing them to syslog. It's enough to have a simple struct with one public String filed:

pub struct Log(pub String);

impl Message for Log {
type Result = ();
}

We added theĀ Log struct and implemented theĀ Message trait for it. We don't need the return value for this message since logging will be a one-way process and all errors will be ignored, since they aren't critical for a microservice application. But if your microservice has to work with a strict security environment, you'll also have to inform an administrator about logging issues.