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
//! Structured Logging Layer for RustAPI
//!
//! This module provides advanced structured logging with support for:
//! - Multiple log formats (JSON, Datadog, Splunk, Logfmt)
//! - Correlation ID injection
//! - Configurable field inclusion
//! - Log level filtering
//!
//! # Example
//!
//! ```rust,no_run
//! use rustapi_core::RustApi;
//! use rustapi_extras::structured_logging::{StructuredLoggingConfig, StructuredLoggingLayer, LogOutputFormat};
//!
//! #[tokio::main]
//! async fn main() {
//! let config = StructuredLoggingConfig::builder()
//! .format(LogOutputFormat::Json)
//! .include_request_headers(true)
//! .correlation_id_header("x-request-id")
//! .build();
//!
//! let app = RustApi::new()
//! .layer(StructuredLoggingLayer::new(config))
//! .run("0.0.0.0:3000")
//! .await
//! .unwrap();
//! }
//! ```
pub use ;
pub use ;
pub use StructuredLoggingLayer;