Trait BuildMessageLogger

pub trait BuildMessageLogger: Send + Sync + 'static

Receives cc's messages, set with Build::message_logger.

cc calls the logger on the thread that runs the Build method, also with the parallel feature. Clones of a Build share the logger and may run on other threads, so any synchronisation it needs is up to the logger.

Required Methods

fn log(&self, kind: BuildMessageKind, msg: BuildMessage<'_>, extra: &dyn Any)

Called for each message.

kind says what the message is about, msg holds its text, and extra holds more about it, depending on kind:

The logger can't fail the build, but a panic in it reaches the caller of the Build method that was running.