easy-sql 0.101.1

Macro-first SQL toolkit with compile-time checked queries, optional migrations on top of sqlx.
Documentation
use std::sync::Once;
use tracing::Level;
use tracing_subscriber::fmt::format::FmtSpan;

static INIT: Once = Once::new();

/// Initialize the test logger. This should be called at the beginning of each test.
pub fn init_test_logger() {
    INIT.call_once(|| {
        let subscriber = tracing_subscriber::fmt()
            .with_max_level(Level::DEBUG)
            .with_test_writer()
            .with_thread_ids(true)
            .with_thread_names(true)
            .with_file(true)
            .with_line_number(true)
            .with_target(true)
            .with_span_events(FmtSpan::ACTIVE)
            .compact()
            .finish();

        tracing::subscriber::set_global_default(subscriber)
            .expect("Failed to set tracing subscriber");
    });
}
#[test]
/// This test ensures that the logger is properly initialized, when all tests are run, before any of them start
fn setup_logger() {
    init_test_logger();
}