/// Instantiate a root logger appropriate for the subcommand
Instantiate a root logger appropriate for the subcommand
Instantiate a root logger appropriate for the subcommand
pub fn root(verbosity: u8, command: &Command) -> slog::Logger {
    let level = match verbosity {
        0 => slog::Level::Info,
        _ => slog::Level::Debug,
    };
    let log_to = match command {
        // direnv swallows stdout, so we must log to stderr
        Command::Direnv(_) => LogTo::Stderr,
        _ => LogTo::Stdout,
    };
    lorri_logger(level, log_to)
}
pub fn root ( verbosity : u8 , command : & Command ) -> slog :: Logger { let level = match verbosity { 0 => slog :: Level :: Info , _ => slog :: Level :: Debug , } ; let log_to = match command { // direnv swallows stdout, so we must log to stderr Command :: Direnv ( _ ) => LogTo :: Stderr , _ => LogTo :: Stdout , } ; lorri_logger ( level , log_to ) }
Instantiate a root logger appropriate for the subcommand
Instantiate a root logger appropriate for the subcommand
verbosity
u8
command
&Command