improve logging

This commit is contained in:
Ondřej Hruška 2021-08-21 00:33:06 +02:00
parent 2c6d0107bf
commit bf301794f6
No known key found for this signature in database
GPG key ID: 2C5FD5035250423D

View file

@ -30,10 +30,11 @@ fn main() -> anyhow::Result<()> {
for event in client.streaming_user()? {
match event {
Event::Update(status) => {
debug!("Status: {:#?}", status);
info!("Status: {:?}", status);
},
Event::Notification(notification) => {
debug!("Notification: {:#?}", notification);
info!("Notification: {:?}", notification.notification_type);
debug!("{:?}", notification);
match notification.notification_type {
NotificationType::Mention => {
@ -77,15 +78,17 @@ fn main() -> anyhow::Result<()> {
}
},
Event::Delete(id) => {
debug!("Delete: {}", id);
info!("Delete: {}", id);
},
Event::FiltersChanged => {
debug!("FiltersChanged");
info!("FiltersChanged");
// ???
},
}
}
println!("Main loop ended!");
Ok(())
}