[][src]Function log::set_boxed_logger

pub fn set_boxed_logger(logger: Box<dyn Log>) -> Result<(), SetLoggerError>

Sets the global logger to a Box<Log>.

This is a simple convenience wrapper over set_logger, which takes a Box<Log> rather than a &'static Log. See the documentation for set_logger for more details.

Requires the std feature.

Errors

An error is returned if a logger has already been set.