diff --git a/net_util/src/ctrl_queue.rs b/net_util/src/ctrl_queue.rs index 6b668a27e..8eb840862 100644 --- a/net_util/src/ctrl_queue.rs +++ b/net_util/src/ctrl_queue.rs @@ -2,6 +2,7 @@ // // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause +use log::{error, info, warn}; use thiserror::Error; use virtio_bindings::virtio_net::{ VIRTIO_NET_CTRL_GUEST_OFFLOADS, VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET, VIRTIO_NET_CTRL_MQ, diff --git a/net_util/src/lib.rs b/net_util/src/lib.rs index 1cc43d475..6cf579150 100644 --- a/net_util/src/lib.rs +++ b/net_util/src/lib.rs @@ -5,9 +5,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the THIRD-PARTY file. -#[macro_use] -extern crate log; - mod ctrl_queue; mod mac; mod open_tap; diff --git a/net_util/src/mac.rs b/net_util/src/mac.rs index d3a3c9575..dec802788 100644 --- a/net_util/src/mac.rs +++ b/net_util/src/mac.rs @@ -8,6 +8,7 @@ use std::str::FromStr; use std::{fmt, io}; +use log::error; use serde::de::{Deserialize, Deserializer, Error}; use serde::ser::{Serialize, Serializer}; diff --git a/net_util/src/open_tap.rs b/net_util/src/open_tap.rs index cbe77765c..bbe1db432 100644 --- a/net_util/src/open_tap.rs +++ b/net_util/src/open_tap.rs @@ -6,6 +6,7 @@ use std::net::IpAddr; use std::path::Path; use std::{fs, io}; +use log::warn; use thiserror::Error; use super::{MacAddr, Tap, TapError, vnet_hdr_len}; diff --git a/net_util/src/queue_pair.rs b/net_util/src/queue_pair.rs index 6202833a1..a6bce4409 100644 --- a/net_util/src/queue_pair.rs +++ b/net_util/src/queue_pair.rs @@ -8,6 +8,7 @@ use std::os::unix::io::{AsRawFd, RawFd}; use std::sync::Arc; use std::sync::atomic::{AtomicU64, Ordering}; +use log::{error, info}; use rate_limiter::{RateLimiter, TokenType}; use thiserror::Error; use virtio_queue::{Queue, QueueOwnedT, QueueT};