diff --git a/Cargo.lock b/Cargo.lock index 0e442ca..f934745 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -659,7 +659,7 @@ dependencies = [ [[package]] name = "ica-rs" -version = "0.6.7" +version = "0.6.8" dependencies = [ "anyhow", "base64 0.22.1", diff --git a/ica-rs/Cargo.toml b/ica-rs/Cargo.toml index ec3707e..587bbde 100644 --- a/ica-rs/Cargo.toml +++ b/ica-rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ica-rs" -version = "0.6.7" +version = "0.6.8" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/ica-rs/src/main.rs b/ica-rs/src/main.rs index 5e28f34..5646409 100644 --- a/ica-rs/src/main.rs +++ b/ica-rs/src/main.rs @@ -26,7 +26,7 @@ pub type StopGetter = tokio::sync::oneshot::Receiver<()>; pub const VERSION: &str = env!("CARGO_PKG_VERSION"); pub const ICA_VERSION: &str = "1.6.0"; -pub const TAILCHAT_VERSION: &str = "1.1.0"; +pub const TAILCHAT_VERSION: &str = "1.2.0"; #[macro_export] macro_rules! async_callback_with_state { diff --git a/ica-rs/src/tailchat/events.rs b/ica-rs/src/tailchat/events.rs index 0897e71..f4d132a 100644 --- a/ica-rs/src/tailchat/events.rs +++ b/ica-rs/src/tailchat/events.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use colored::Colorize; use rust_socketio::asynchronous::Client; use rust_socketio::{Event, Payload}; -use tracing::info; +use tracing::{event, info, Level}; use crate::data_struct::tailchat::messages::ReceiveMessage; use crate::data_struct::tailchat::status::{BotStatus, UpdateDMConverse}; @@ -68,12 +68,12 @@ pub async fn on_message(payload: Payload, client: Client, status: Arc let message: ReceiveMessage = match serde_json::from_value(value.clone()) { Ok(v) => v, Err(e) => { - info!("tailchat_msg {}", value.to_string().red()); - info!("tailchat_msg {}", format!("{:?}", e).red()); + event!(Level::WARN, "tailchat_msg {}", value.to_string().red()); + event!(Level::WARN, "tailchat_msg {}", format!("{:?}", e).red()); return; } }; - info!("tailchat_msg {}", message.to_string().cyan()); + event!(Level::INFO, "tailchat_msg {}", message.to_string().yellow()); if !message.is_reply() { if message.content == "/bot-rs" {