feat: better logging output
parent
540c306483
commit
3066753c69
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "songlify"
|
||||
version = "0.3.2"
|
||||
version = "0.3.3"
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
|
11
src/main.rs
11
src/main.rs
|
@ -1,3 +1,4 @@
|
|||
use log::LevelFilter;
|
||||
use sentry::ClientInitGuard;
|
||||
use std::env;
|
||||
use teloxide::prelude::*;
|
||||
|
@ -15,8 +16,16 @@ static MAX_ARTISTS_CHARS: usize = 140;
|
|||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
teloxide::enable_logging!();
|
||||
if env::var("RUST_LOG").is_err() {
|
||||
pretty_env_logger::formatted_builder()
|
||||
.filter_module("songlify", LevelFilter::Info)
|
||||
.filter_module("teloxide", LevelFilter::Info)
|
||||
.init();
|
||||
} else {
|
||||
pretty_env_logger::init();
|
||||
}
|
||||
log::info!("Starting Songlify...");
|
||||
log::trace!("You're running in trace mode!");
|
||||
|
||||
let mut _guard: ClientInitGuard;
|
||||
match env::var("SENTRY_DSN") {
|
||||
|
|
Loading…
Reference in New Issue