replace additional use tracing::

add log:: to disallowed-macros

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-11-14 04:31:29 +00:00
parent e228dec4f2
commit 4ec5d1e28e
7 changed files with 19 additions and 9 deletions

View File

@ -5,3 +5,11 @@ future-size-threshold = 7745 # TODO reduce me ALARA
stack-size-threshold = 196608 # reduce me ALARA stack-size-threshold = 196608 # reduce me ALARA
too-many-lines-threshold = 700 # TODO reduce me to <= 100 too-many-lines-threshold = 700 # TODO reduce me to <= 100
type-complexity-threshold = 250 # reduce me to ~200 type-complexity-threshold = 250 # reduce me to ~200
disallowed-macros = [
{ path = "log::error", reason = "use conduit_core::error" },
{ path = "log::warn", reason = "use conduit_core::warn" },
{ path = "log::info", reason = "use conduit_core::info" },
{ path = "log::debug", reason = "use conduit_core::debug" },
{ path = "log::trace", reason = "use conduit_core::trace" },
]

View File

@ -2,7 +2,7 @@ use std::time::Duration;
use axum::extract::State; use axum::extract::State;
use axum_client_ip::InsecureClientIp; use axum_client_ip::InsecureClientIp;
use conduit::{utils::ReadyExt, Err}; use conduit::{info, utils::ReadyExt, Err};
use rand::Rng; use rand::Rng;
use ruma::{ use ruma::{
api::client::{ api::client::{
@ -13,7 +13,6 @@ use ruma::{
int, EventId, RoomId, UserId, int, EventId, RoomId, UserId,
}; };
use tokio::time::sleep; use tokio::time::sleep;
use tracing::info;
use crate::{ use crate::{
debug_info, debug_info,

View File

@ -1,5 +1,8 @@
use axum::extract::State; use axum::extract::State;
use conduit::utils::{IterStream, ReadyExt}; use conduit::{
utils::{IterStream, ReadyExt},
warn,
};
use futures::StreamExt; use futures::StreamExt;
use ruma::{ use ruma::{
api::{client::error::ErrorKind, federation::membership::prepare_join_event}, api::{client::error::ErrorKind, federation::membership::prepare_join_event},
@ -13,7 +16,6 @@ use ruma::{
CanonicalJsonObject, RoomId, RoomVersionId, UserId, CanonicalJsonObject, RoomId, RoomVersionId, UserId,
}; };
use serde_json::value::to_raw_value; use serde_json::value::to_raw_value;
use tracing::warn;
use crate::{ use crate::{
service::{pdu::PduBuilder, Services}, service::{pdu::PduBuilder, Services},

View File

@ -1,3 +1,5 @@
#![allow(clippy::disallowed_macros)]
use std::{any::Any, panic}; use std::{any::Any, panic};
// Export debug proc_macros // Export debug proc_macros

View File

@ -1,3 +1,5 @@
#![allow(clippy::disallowed_macros)]
pub mod capture; pub mod capture;
pub mod color; pub mod color;
pub mod fmt; pub mod fmt;

View File

@ -1,6 +1,4 @@
use tracing::debug; use crate::{debug, Result};
use crate::Result;
/// This is needed for opening lots of file descriptors, which tends to /// This is needed for opening lots of file descriptors, which tends to
/// happen more often when using RocksDB and making lots of federation /// happen more often when using RocksDB and making lots of federation

View File

@ -5,9 +5,8 @@ use std::{
use axum::Router; use axum::Router;
use axum_server::{bind, Handle as ServerHandle}; use axum_server::{bind, Handle as ServerHandle};
use conduit::{debug_info, Result, Server}; use conduit::{debug_info, info, Result, Server};
use tokio::task::JoinSet; use tokio::task::JoinSet;
use tracing::info;
pub(super) async fn serve( pub(super) async fn serve(
server: &Arc<Server>, app: Router, handle: ServerHandle, addrs: Vec<SocketAddr>, server: &Arc<Server>, app: Router, handle: ServerHandle, addrs: Vec<SocketAddr>,