Overview
Structured contextual logging built on tracing. This crate provides experimental observability features for AIngle distributed systems, including console output, JSON logging, and span filtering.
Features
- Structured logging - Context-aware log events with spans
- Multiple outputs - Console, JSON, and custom formatters
- Powerful filtering - Filter by module, span, or field values
- Zero-cost abstractions - Disabled spans compile to no-ops
Installation
[]
= "0.1"
Quick Start
Console Logging
# Simple logging
RUST_LOG=trace
# Filtered logging
RUST_LOG='core[a{something="foo"}]=debug'
JSON Output
RUST_LOG='core[{}]=debug'
Filter Syntax
# Module + span + field filtering
RUST_LOG='core[a{something="foo"}]=debug'
# Multiple filters
RUST_LOG='[{}]=error,[{something}]=debug'
| Component | Description |
|---|---|
core |
Module path filter |
[a] |
Span name filter |
{field="value"} |
Field value filter |
=debug |
Minimum log level |
JSON Output
Useful Tools
| Tool | Purpose |
|---|---|
| jq | JSON processing |
| json2csv | Convert to CSV |
| tad | CSV viewer |
Resources
Part of AIngle
This crate is part of the AIngle ecosystem - a Semantic DAG framework for IoT and distributed AI applications.
License
Licensed under the MIT License. See LICENSE for details.