From 0892425bf833c03765e2edba8d6fdb338ae68ed5 Mon Sep 17 00:00:00 2001 From: Jokler Date: Sat, 17 Feb 2018 23:24:13 +0100 Subject: Improve startup logs --- bin/main.rs | 5 ++++- src/lib.rs | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/main.rs b/bin/main.rs index fd0b4ab..88f3809 100644 --- a/bin/main.rs +++ b/bin/main.rs @@ -119,7 +119,10 @@ fn main() { match diesel::mysql::MysqlConnection::establish(url) { Ok(conn) => { match embedded_migrations::run(&conn) { - Ok(_) => bot.add_plugin(plugins::Factoids::new(conn)), + Ok(_) => { + bot.add_plugin(plugins::Factoids::new(conn)); + info!("Connected to MySQL server") + } Err(e) => { bot.add_plugin(plugins::Factoids::new(HashMap::new())); error!("Failed to run migrations: {}", e); diff --git a/src/lib.rs b/src/lib.rs index 186d35c..54c672e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -147,12 +147,12 @@ impl Bot { match IrcServer::new_future(reactor.handle(), config).and_then(|f| {reactor.run(f)}) { Ok(v) => v, Err(e) => { - error!("Failed to connect: {}", e); + error!("Failed to connect to IRC server: {}", e); return; } }; - info!("Connected to server"); + info!("Connected to IRC server"); match server.identify() { Ok(_) => info!("Identified"), -- cgit v1.2.3-70-g09d2