sea_orm/
util.rs

1/// Uses the `log` crate to perform logging.
2/// This must be enabled using the feature flag `debug-print`.
3/// ### Usage
4/// ```
5/// use sea_orm::debug_print;
6///
7/// #[derive(Debug)]
8/// enum FooError {
9///     Bar,
10///     Baz,
11/// }
12///
13/// debug_print!("{:?}", FooError::Bar);
14/// ```
15#[macro_export]
16#[cfg(feature = "debug-print")]
17macro_rules! debug_print {
18    ($( $args:expr ),*) => { tracing::debug!( $( $args ),* ); }
19}
20
21#[macro_export]
22/// Non-debug version
23#[cfg(not(feature = "debug-print"))]
24macro_rules! debug_print {
25    ($( $args:expr ),*) => {
26        true;
27    };
28}