refactor: add info/debug

This commit is contained in:
VC
2022-11-08 08:37:53 +01:00
parent c62f67c3b3
commit 3c64df23bc
2 changed files with 9 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ pub use state::{init_db, migrate_db};
use state::{read_state, write_state, TweetToToot};
use elefren::{prelude::*, status_builder::StatusBuilder};
use log::{debug, info};
use log::info;
use rusqlite::Connection;
use std::sync::Arc;
use tokio::{spawn, sync::Mutex};
@@ -48,7 +48,7 @@ pub async fn run(config: Config) {
let task_conn = conn.clone();
let task = spawn(async move {
debug!("Starting treating {}", &mastodon_config.twitter_screen_name);
info!("Starting treating {}", &mastodon_config.twitter_screen_name);
// retrieve the last tweet ID for the username
let lconn = task_conn.lock().await;
@@ -81,7 +81,7 @@ pub async fn run(config: Config) {
feed.reverse();
for tweet in &feed {
debug!("Treating Tweet {} inside feed", tweet.id);
info!("Treating Tweet {} inside feed", tweet.id);
// initiate the toot_reply_id var
let mut toot_reply_id: Option<String> = None;
// determine if the tweet is part of a thread (response to self) or a standard response
@@ -113,7 +113,7 @@ pub async fn run(config: Config) {
status_text = status_text.replace(&media_url, "");
debug!("Building corresponding Mastodon status");
info!("Building corresponding Mastodon status");
let mut status_builder = StatusBuilder::new();