1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! 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
pub
pub use *;
pub use *;
pub use ;
pub use ;
pub use ;