aboutsummaryrefslogtreecommitdiff
path: root/src/bin/lambo.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/lambo.rs')
-rw-r--r--src/bin/lambo.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/bin/lambo.rs b/src/bin/lambo.rs
index 1134480..f446308 100644
--- a/src/bin/lambo.rs
+++ b/src/bin/lambo.rs
@@ -4,7 +4,6 @@ use lambo::{config::Config, handlers::*};
use serenity::{all::GatewayIntents, Client};
use sqlx::sqlite::SqlitePoolOptions;
use std::{path::PathBuf, sync::Arc};
-use stderrlog::StdErrLog;
#[derive(Debug, Parser)]
struct Args {
@@ -38,18 +37,7 @@ async fn main() -> Result<()> {
let args = Args::parse();
// Set up logging.
- {
- let mut logger = StdErrLog::new();
- match args.quiet {
- 0 => logger.verbosity(1 + args.verbose as usize),
- 1 => logger.verbosity(0),
- 2 => logger.quiet(true),
- // UNREACHABLE: A maximum of two occurrences of quiet are allowed.
- _ => unreachable!(),
- };
- // UNWRAP: No other logger should be set up.
- logger.show_module_names(true).init().unwrap()
- }
+ lambo::configure_logger(args.quiet, args.verbose)?;
// Parse the config file.
let config = Config::read_from_file(&args.config_path)?;