Handler of the Log messages is quite simple. We call the info method of Logger with a provided message and ignore errors with by converting a Result into an Option:
impl Handler<Log> for LogActor {
type Result = ();
fn handle(&mut self, Log(mesg): Log, _: &mut Context<Self>) -> Self::Result {
self.writer.info(mesg).ok();
}
}
The last actor we have to implement is the resizing actor.