From 98633aa5ccfdd2d6a3b4043b13421ee20c048f22 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Tue, 19 Nov 2024 22:05:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=8D=E5=BE=AE=E5=8E=BB=E9=99=A4=E4=B8=80?= =?UTF-8?q?=E7=82=B9=20info=20=E4=B9=8B=E7=B1=BB=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ica-rs/src/main.rs | 2 +- ica-rs/src/py/class/ica.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ica-rs/src/main.rs b/ica-rs/src/main.rs index ea56286..3c78e23 100644 --- a/ica-rs/src/main.rs +++ b/ica-rs/src/main.rs @@ -73,7 +73,7 @@ pub fn version_str() -> String { /// 是否为稳定版本 /// 会在 release 的时候设置为 true -pub const STABLE: bool = true; +pub const STABLE: bool = false; #[macro_export] macro_rules! async_callback_with_state { diff --git a/ica-rs/src/py/class/ica.rs b/ica-rs/src/py/class/ica.rs index 2513fe1..bfdb969 100644 --- a/ica-rs/src/py/class/ica.rs +++ b/ica-rs/src/py/class/ica.rs @@ -1,9 +1,9 @@ use std::time::SystemTime; -use pyo3::prelude::*; +use pyo3::{pyclass, pymethods}; use rust_socketio::asynchronous::Client; use tokio::runtime::Runtime; -use tracing::{debug, info, warn}; +use tracing::{event, Level}; use crate::data_struct::ica::messages::{ DeleteMessage, MessageTrait, NewMessage, ReplyMessage, SendMessage, @@ -192,7 +192,7 @@ impl IcaClientPy { } pub fn send_and_warn(&self, message: SendMessagePy) -> bool { - warn!(message.msg.content); + event!(Level::WARN, message.msg.content); self.send_message(message) } @@ -231,13 +231,13 @@ impl IcaClientPy { pub fn get_startup_time(&self) -> SystemTime { crate::MainStatus::get_startup_time() } pub fn debug(&self, content: String) { - debug!("{}", content); + event!(Level::DEBUG, "{}", content); } pub fn info(&self, content: String) { - info!("{}", content); + event!(Level::INFO, "{}", content); } pub fn warn(&self, content: String) { - warn!("{}", content); + event!(Level::WARN, "{}", content); } }