Files
continuwuity/src/core/log/mod.rs
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.0 KiB
Rust
Raw Normal View History

2024-06-11 01:26:31 +00:00
pub mod capture;
2024-06-11 00:14:53 +00:00
pub mod color;
2024-06-11 00:15:29 +00:00
pub mod fmt;
2024-06-08 01:13:20 +00:00
mod reload;
2024-06-11 01:26:31 +00:00
mod server;
2024-06-13 02:15:51 +00:00
mod suppress;
2024-06-08 01:13:20 +00:00
2024-06-11 01:26:31 +00:00
pub use capture::Capture;
pub use reload::{LogLevelReloadHandles, ReloadHandle};
pub use server::Server;
2024-06-13 02:15:51 +00:00
pub use suppress::Suppress;
2024-06-11 01:26:31 +00:00
pub use tracing::Level;
pub use tracing_core::{Event, Metadata};
2024-06-10 06:02:17 +00:00
pub use tracing_subscriber::EnvFilter;
2024-06-08 01:13:20 +00:00
2024-06-11 01:26:31 +00:00
// Wraps for logging macros. Use these macros rather than extern tracing:: or
// log:: crates in project code. ::log and ::tracing can still be used if
// necessary but discouraged. Remember debug_ log macros are also exported to
// the crate namespace like these.
2024-06-08 01:13:20 +00:00
#[macro_export]
macro_rules! error {
( $($x:tt)+ ) => { tracing::error!( $($x)+ ); }
}
#[macro_export]
macro_rules! warn {
( $($x:tt)+ ) => { tracing::warn!( $($x)+ ); }
}
#[macro_export]
macro_rules! info {
( $($x:tt)+ ) => { tracing::info!( $($x)+ ); }
}
#[macro_export]
macro_rules! debug {
( $($x:tt)+ ) => { tracing::debug!( $($x)+ ); }
}
#[macro_export]
macro_rules! trace {
( $($x:tt)+ ) => { tracing::trace!( $($x)+ ); }
}