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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
//! # Telelog - High-Performance Structured Logging
//!
//! Telelog is a high-performance logging library for Rust that provides:
//! - Structured JSON-first logging
//! - Performance profiling and monitoring
//! - Cross-language bindings support
//! - System resource monitoring
//! - Context management and decorators
//! - Thread-local buffer pooling for reduced allocations
//!
//! ## Quick Start
//!
//! ```rust
//! use telelog::{Logger, LogLevel};
//!
//! let logger = Logger::new("my_app");
//! logger.info("Application started");
//!
//! // With structured data
//! logger.info_with("User logged in", &[
//! ("user_id", "12345"),
//! ("session_id", "abcdef"),
//! ]);
//!
//! // Performance profiling
//! let _guard = logger.profile("expensive_operation");
//! // Your expensive operation here
//! ```
//!
//! ## Async Support
//!
//! Enable the `async` feature for bounded async output with backpressure:
//!
//! ```rust,ignore
//! use telelog::{Logger, AsyncOutput};
//!
//! #[tokio::main]
//! async fn main() {
//! let logger = Logger::new("app");
//! let mut async_output = AsyncOutput::new();
//! logger.add_output(Box::new(async_output));
//! logger.info("Async logging!");
//! }
//! ```
//!
//! ## Performance
//!
//! - **~788ns** per log with thread-local buffer pooling
//! - **~11ns** level check overhead (nearly free when filtered)
//! - **Bounded async** channels with backpressure (capacity: 1000)
//!
//! ## Features
//!
//! - **Thread-safe** logging with parking_lot
//! - **Optimized allocations** with thread-local buffer pooling
//! - **Optional features**: async, system-monitor, console, python
pub use ;
pub use Config;
pub use ;
pub use LogLevel;
pub use Logger;
pub use ;
pub use ProfileGuard;
pub use ;
pub use AsyncOutput;
pub use SystemMonitor;
pub const VERSION: &str = env!;
/// Initialize telelog with default configuration.
///
/// For more control, use `Logger::new()` directly.
///
/// # Example
///
/// ```rust
/// use telelog;
///
/// let logger = telelog::init("my_app");
/// logger.info("Hello, telelog!");
/// ```
/// Initialize telelog with custom configuration
///
/// # Example
///
/// ```rust
/// use telelog::{init_with_config, Config};
///
/// let config = Config::new()
/// .with_console_output(true)
/// .with_json_format(true);
///
/// let logger = init_with_config("my_app", config);
/// logger.info("Hello, telelog!");
/// ```