Skip to content
Snippets Groups Projects
Commit c05f0066 authored by Jason Volk's avatar Jason Volk
Browse files

use extern namespace in log wrapper macros


convert use tracing statements

Signed-off-by: default avatarJason Volk <jason@zemos.net>
parent 0e46b750
No related branches found
No related tags found
3 merge requests!480Misc,!475Room Alias related,!476Misc Admin related
use std::sync::Arc;
use conduit::{error, warn};
use ruma::{
api::client::{
error::ErrorKind,
......@@ -16,7 +17,6 @@
serde::Raw,
EventId, RoomId, UserId,
};
use tracing::{error, log::warn};
use crate::{
service::{pdu::PduBuilder, server_is_ours},
......
......@@ -14,9 +14,9 @@
macro_rules! debug_event {
( $level:expr, $($x:tt)+ ) => {
if cfg!(debug_assertions) && cfg!(not(feature = "dev_release_log_level")) {
tracing::event!( $level, $($x)+ );
::tracing::event!( $level, $($x)+ );
} else {
tracing::debug!( $($x)+ );
::tracing::debug!( $($x)+ );
}
}
}
......@@ -27,7 +27,7 @@ macro_rules! debug_event {
#[macro_export]
macro_rules! debug_error {
( $($x:tt)+ ) => {
$crate::debug_event!(tracing::Level::ERROR, $($x)+ );
$crate::debug_event!(::tracing::Level::ERROR, $($x)+ );
}
}
......@@ -37,7 +37,7 @@ macro_rules! debug_error {
#[macro_export]
macro_rules! debug_warn {
( $($x:tt)+ ) => {
$crate::debug_event!(tracing::Level::WARN, $($x)+ );
$crate::debug_event!(::tracing::Level::WARN, $($x)+ );
}
}
......@@ -47,7 +47,7 @@ macro_rules! debug_warn {
#[macro_export]
macro_rules! debug_info {
( $($x:tt)+ ) => {
$crate::debug_event!(tracing::Level::INFO, $($x)+ );
$crate::debug_event!(::tracing::Level::INFO, $($x)+ );
}
}
......
......@@ -20,25 +20,25 @@
#[macro_export]
macro_rules! error {
( $($x:tt)+ ) => { tracing::error!( $($x)+ ); }
( $($x:tt)+ ) => { ::tracing::error!( $($x)+ ); }
}
#[macro_export]
macro_rules! warn {
( $($x:tt)+ ) => { tracing::warn!( $($x)+ ); }
( $($x:tt)+ ) => { ::tracing::warn!( $($x)+ ); }
}
#[macro_export]
macro_rules! info {
( $($x:tt)+ ) => { tracing::info!( $($x)+ ); }
( $($x:tt)+ ) => { ::tracing::info!( $($x)+ ); }
}
#[macro_export]
macro_rules! debug {
( $($x:tt)+ ) => { tracing::debug!( $($x)+ ); }
( $($x:tt)+ ) => { ::tracing::debug!( $($x)+ ); }
}
#[macro_export]
macro_rules! trace {
( $($x:tt)+ ) => { tracing::trace!( $($x)+ ); }
( $($x:tt)+ ) => { ::tracing::trace!( $($x)+ ); }
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment