MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/splashsurf / build_logger

Function build_logger

splashsurf/src/logging.rs:140–150  ·  view source on GitHub ↗
(log_filter_level: log::LevelFilter, formatter: F)

Source from the content-addressed store, hash-verified

138}
139
140fn build_logger<F>(log_filter_level: log::LevelFilter, formatter: F) -> Result<(), anyhow::Error>
141where
142 F: Fn(fern::FormatCallback, &std::fmt::Arguments, &log::Record) + Sync + Send + 'static,
143{
144 fern::Dispatch::new()
145 .format(formatter)
146 .level(log_filter_level)
147 .chain(ProgressHandler::new(std::io::stdout()).into_output())
148 .apply()
149 .map_err(|e| anyhow!("Unable to apply logger configuration ({:?})", e))
150}
151
152/// Prints program name, version etc. and command line arguments to log
153pub(crate) fn log_program_info() {

Callers 1

initialize_loggingFunction · 0.85

Calls 1

into_outputMethod · 0.80

Tested by

no test coverage detected