lxy 0.1.1

A convenient async http and RPC framework in Rust
Documentation
//! Tracing and logging infrastructure for lxy applications.
//!
//! This module provides a flexible, layered approach to logging using `tracing` and
//! `tracing-subscriber`. It supports:
//!
//! - **Multiple output targets**: stdout, files with rotation
//! - **Advanced filtering**: Using `EnvFilter` syntax for fine-grained control
//! - **Environment variables**: `RUST_LOG` for filters, `LXY_LOG` for layer selection
//! - **Flexible formatting**: Human-readable or JSON output
//!
//! # EnvFilter Syntax
//!
//! The `filter` field supports the full `EnvFilter` syntax:
//!
//! - `"info"` - Set level to INFO for all targets
//! - `"my_crate=debug"` - Set DEBUG for my_crate, INFO for others
//! - `"my_crate::module=trace"` - Set TRACE for specific module
//! - `"warn,my_crate=debug"` - Set default WARN, my_crate DEBUG
//!
//! # Filter Priority
//!
//! Each layer resolves its filter in this order:
//! 1. Layer-specific `filter` field
//! 2. `RUST_LOG` environment variable
//! 3. Global `filter` field from config
//! 4. Default: `"info"`
//!
//! # Layer Selection Priority
//!
//! Layers are activated based on:
//! 1. `LXY_LOG` environment variable (comma-separated)
//! 2. `use` field in config
//! 3. Default: no layers (empty)
//!
//! # Example
//!
//! ```toml
//! [tracing]
//! filter = "info"
//! format = "json"
//! layers = [
//!   { name = "stdout", type = "stdout", format = "plaintext", filter = "debug" },
//!   { name = "file", type = "file", path = "logs/app.log", filter = "lxy=debug" },
//! ]
//! use = ["stdout"]
//! ```
//!
//! You can override layer selection at runtime:
//! ```bash
//! LXY_LOG=stdout,file cargo run
//! RUST_LOG=lxy=trace cargo run
//! ```

pub(crate) mod boot;
pub mod builder;
pub mod config;
pub(crate) mod writer;

pub(crate) use builder::*;
pub use config::*;
pub use tracing::{Level, instrument, span};
pub use tracing::{debug, error, info, trace, warn};
pub use tracing::{debug_span, error_span, info_span, trace_span, warn_span};