[package]
name = "shared-logging"
version = "0.1.0"
edition = "2021"
authors = ["Kelley Blackmore <kelleyblackmore@gmail.com>"]
description = "Structured logging library with context propagation, redaction, and HTTP middleware"
license = "MIT"
repository = "https://github.com/kelleyblackmore/shared-logging"
keywords = ["logging", "structured-logging", "tracing", "observability", "redaction"]
categories = ["development-tools"]
readme = "README.md"
[lib]
name = "shared_logging"
path = "src/lib.rs"
[dependencies]
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json", "fmt", "chrono"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
uuid = { version = "1.0", features = ["v4", "serde"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["trace"], optional = true }
http = "1.0"
http-body = "1.0"
opentelemetry = { version = "0.24", optional = true }
opentelemetry_sdk = { version = "0.24", optional = true }
tracing-opentelemetry = { version = "0.24", optional = true }
thiserror = "1.0"
chrono = "0.4"
regex = "1.10"
[dev-dependencies]
tokio = { version = "1.0", features = ["full"] }
axum = "0.7"
tower-http = { version = "0.6", features = ["trace"] }
[[example]]
name = "basic_usage"
path = "examples/basic_usage.rs"
[[example]]
name = "http_server"
path = "examples/http_server.rs"
[[example]]
name = "error_handling"
path = "examples/error_handling.rs"
[features]
default = []
otel = ["opentelemetry", "opentelemetry_sdk", "tracing-opentelemetry"]
http = ["tower-http"]