Move all debug printing to stderr

This commit is contained in:
kageru 2021-11-25 22:19:04 +01:00
parent b329bc7ea7
commit 0a6b78a007
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2
2 changed files with 3 additions and 3 deletions

View File

@ -88,7 +88,7 @@ async fn main() {
INBOX.count_messages("test"); // initialize the lazy static so we know if redis is unavailable
if let Err(why) = client.start().await {
println!("An error occurred while running the client: {:?}", why);
eprintln!("An error occurred while running the client: {:?}", why);
}
}
@ -168,7 +168,7 @@ async fn inbox(ctx: &Context, msg: &Message) -> CommandResult {
send_or_log!(msg.channel_id.say(&ctx, &content).await);
}
}
println!("{:?}", messages); // paranoia for now so the messages aren’t lost
eprintln!("{:?}", messages); // paranoia for now so the messages aren’t lost
if let Err(e) = INBOX.clear_messages(name) {
eprintln!("Could not clear inbox of user {} because {}", name, e);
}

View File

@ -12,7 +12,7 @@ lazy_static! {
&std::fs::read_to_string("reaction_config.json").unwrap_or("[]".to_string()),
)
.expect("Could not read reaction config");
println!("Read reaction config: {:?}", c);
eprintln!("Read reaction config: {:?}", c);
c
};
}