From 3cfe1bede2b024a1246af976b90ca7237ca7cc3d Mon Sep 17 00:00:00 2001 From: Simon THOBY Date: Tue, 19 Oct 2021 22:42:15 +0200 Subject: Revert part of aa1cc7089a70d134f2d71f84293628e05818b07f tokio-rs/tracing pulls in a lot more dependencies that log, also potentially impacting negatively the build time of the crate. While this was an acceptable choice for a single user of the crate, which was what I had in mind when I made this commit in the first place, it is not perhaps not a sensible choice for a project that aims at gaining tractiong and seeks to provide a simple, safe and abstract wrapper for libnftnl. Hence the move back to the log crate. --- rustables/src/batch.rs | 1 - rustables/src/chain.rs | 1 - rustables/src/expr/cmp.rs | 1 - rustables/src/lib.rs | 3 +++ rustables/src/query.rs | 2 -- rustables/src/rule.rs | 1 - rustables/src/set.rs | 1 - rustables/src/table.rs | 1 - 8 files changed, 3 insertions(+), 8 deletions(-) (limited to 'rustables/src') diff --git a/rustables/src/batch.rs b/rustables/src/batch.rs index 0f43402..24eca8e 100644 --- a/rustables/src/batch.rs +++ b/rustables/src/batch.rs @@ -4,7 +4,6 @@ use std::ffi::c_void; use std::os::raw::c_char; use std::ptr; use thiserror::Error; -use tracing::trace; /// Error while communicating with netlink #[derive(Error, Debug)] diff --git a/rustables/src/chain.rs b/rustables/src/chain.rs index 25c3604..516536c 100644 --- a/rustables/src/chain.rs +++ b/rustables/src/chain.rs @@ -7,7 +7,6 @@ use std::{ fmt, os::raw::c_char, }; -use tracing::error; pub type Priority = i32; diff --git a/rustables/src/expr/cmp.rs b/rustables/src/expr/cmp.rs index f22a3ff..5c56492 100644 --- a/rustables/src/expr/cmp.rs +++ b/rustables/src/expr/cmp.rs @@ -7,7 +7,6 @@ use std::{ os::raw::c_char, slice, }; -use tracing::trace; /// Comparison operator. #[derive(Copy, Clone, Eq, PartialEq)] diff --git a/rustables/src/lib.rs b/rustables/src/lib.rs index e5b5375..c5d53c0 100644 --- a/rustables/src/lib.rs +++ b/rustables/src/lib.rs @@ -54,6 +54,9 @@ use thiserror::Error; +#[macro_use] +extern crate log; + pub use rustables_sys; use rustables_sys::libc; use std::{convert::TryFrom, ffi::c_void, ops::Deref}; diff --git a/rustables/src/query.rs b/rustables/src/query.rs index c5a6e6c..8d2c281 100644 --- a/rustables/src/query.rs +++ b/rustables/src/query.rs @@ -31,8 +31,6 @@ pub fn get_list_of_objects( mod inner { use crate::FinalizedBatch; - use tracing::debug; - use super::*; #[derive(thiserror::Error, Debug)] diff --git a/rustables/src/rule.rs b/rustables/src/rule.rs index acd3450..cdd1876 100644 --- a/rustables/src/rule.rs +++ b/rustables/src/rule.rs @@ -4,7 +4,6 @@ use std::ffi::{c_void, CStr, CString}; use std::fmt::Debug; use std::os::raw::c_char; use std::sync::Arc; -use tracing::error; /// A nftables firewall rule. pub struct Rule { diff --git a/rustables/src/set.rs b/rustables/src/set.rs index a431afc..9791e7f 100644 --- a/rustables/src/set.rs +++ b/rustables/src/set.rs @@ -8,7 +8,6 @@ use std::{ os::raw::c_char, rc::Rc, }; -use tracing::trace; #[macro_export] macro_rules! nft_set { diff --git a/rustables/src/table.rs b/rustables/src/table.rs index 9de6f5e..447d035 100644 --- a/rustables/src/table.rs +++ b/rustables/src/table.rs @@ -6,7 +6,6 @@ use std::{ fmt::Debug, os::raw::c_char, }; -use tracing::error; /// Abstraction of `nftnl_table`. The top level container in netfilter. A table has a protocol /// family and contain [`Chain`]s that in turn hold the rules. -- cgit v1.2.3