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.
kindsays what the message is about,msgholds its text, andextraholds more about it, depending onkind:GeneralWarning:()StderrForwardingandCommandFailed: theCommandthat was run, read withextra.downcast_ref::<Command>()CompileCommand: theCompileCommand
The logger can't fail the build, but a panic in it reaches the caller of the
Buildmethod that was running.