From ff2267e9f00ab8b2252e9241d13867b0be4bdb6c Mon Sep 17 00:00:00 2001 From: mxsm Date: Sat, 18 Jan 2025 09:08:20 +0800 Subject: [PATCH] =?UTF-8?q?[ISSUE=20#2317]=F0=9F=A4=A1Remove=20broker=20cr?= =?UTF-8?q?ate=20dependeces=20of=20log=20crate=F0=9F=A7=91=E2=80=8D?= =?UTF-8?q?=F0=9F=92=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 1 - rocketmq-broker/Cargo.toml | 1 - rocketmq-broker/src/broker_bootstrap.rs | 3 ++- rocketmq-broker/src/failover/escape_bridge.rs | 9 +++------ 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 63a514d1..0fdb09be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2140,7 +2140,6 @@ dependencies = [ "dirs", "dns-lookup", "lazy_static", - "log", "mockall", "num_cpus", "parking_lot", diff --git a/rocketmq-broker/Cargo.toml b/rocketmq-broker/Cargo.toml index 91e3e06c..a53e587b 100644 --- a/rocketmq-broker/Cargo.toml +++ b/rocketmq-broker/Cargo.toml @@ -54,7 +54,6 @@ thiserror = { workspace = true } trait-variant = { workspace = true } cheetah-string = { workspace = true } dashmap = { workspace = true } -log = "0.4.25" [dev-dependencies] mockall = "0.13.1" static_assertions = { version = "1" } diff --git a/rocketmq-broker/src/broker_bootstrap.rs b/rocketmq-broker/src/broker_bootstrap.rs index f9395e0b..c2fad65d 100644 --- a/rocketmq-broker/src/broker_bootstrap.rs +++ b/rocketmq-broker/src/broker_bootstrap.rs @@ -14,12 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -use log::info; + use rocketmq_common::common::broker::broker_config::BrokerConfig; use rocketmq_common::common::server::config::ServerConfig; use rocketmq_rust::wait_for_signal; use rocketmq_store::config::message_store_config::MessageStoreConfig; use tracing::error; +use tracing::info; use crate::broker_runtime::BrokerRuntime; diff --git a/rocketmq-broker/src/failover/escape_bridge.rs b/rocketmq-broker/src/failover/escape_bridge.rs index deabc2ca..8591d7e3 100644 --- a/rocketmq-broker/src/failover/escape_bridge.rs +++ b/rocketmq-broker/src/failover/escape_bridge.rs @@ -501,13 +501,10 @@ where ) .await; if result.is_none() { - log::warn!( + warn!( "getMessageResult is null, innerConsumerGroupName {}, topic {}, offset \ {}, queueId {}", - inner_consumer_group_name, - topic, - offset, - queue_id + inner_consumer_group_name, topic, offset, queue_id ); return (None, "getMessageResult is null".to_string(), false); } @@ -517,7 +514,7 @@ where if list.is_empty() { let need_retry = status.unwrap() == GetMessageStatus::OffsetFoundNull; // && message_store.is_tiered_message_store(); - log::warn!( + warn!( "Can not get msg, topic {}, offset {}, queueId {}, needRetry {},", topic, offset,