Skip to main content

High-performance structured logging library with rich visualization capabilities

Project description

High-performance structured logging library with component tracking and visualization

Telelog is a Rust-first logging library that combines structured logging, performance profiling, and architectural visualization. It provides rich console output and generates Mermaid diagrams to help you understand your application's execution flow.

Features

  • Performance Profiling - Automatic timing with RAII guards and context managers
  • Component Tracking - Track architectural components and their relationships
  • Visualization - Generate Mermaid flowcharts, timelines, and Gantt charts
  • Context Management - Add persistent context to all log messages
  • Rich Console Output - Clean, colored output for development
  • Python Bindings - Use from Python with Rust-backed performance
  • Type Hints - Full static type checking support for Python (mypy, pyright)
  • High Performance - Thread-local buffer pooling reduces allocations (~788ns per log)
  • Async Support - Bounded async channels with backpressure (requires async feature)

Example Visualizations

Quick Start

Rust

use telelog::Logger;

let logger = Logger::new("my_app");

// Basic logging
logger.info("Application started");
logger.warning("This is a warning");

// Context management
logger.add_context("user_id", "12345");
logger.info("Processing request"); // Includes context

// Performance profiling
{
    let _timer = logger.profile("database_query");
    // Your operation here
} // Automatically logs duration

// Component tracking
{
    let _component = logger.track_component("web_server");
    logger.info("Handling request");
}

Python

# Install via pip
pip install telelog-python
import telelog as tl

logger = tl.Logger("my_app")

# Basic logging with context
logger.add_context("user_id", "12345")
logger.info("Processing request")

# Performance profiling
with logger.profile("database_query"):
    # Your operation here
    pass

# Component tracking with visualization
with logger.track_component("data_pipeline"):
    logger.info("Processing data")

# Generate flowchart
chart = logger.generate_visualization("flowchart")
print(f"Generated chart with {len(chart)} characters")

Visualization

Generate Mermaid diagrams from component tracking:

use telelog::{Logger, MermaidGenerator, ChartConfig, ChartType};

let logger = Logger::new("app");

// Track nested components
{
    let _pipeline = logger.track_component("data_pipeline");
    {
        let _extract = logger.track_component("extract");
        // extraction logic
    }
    {
        let _transform = logger.track_component("transform");
        // transformation logic
    }
}

// Generate visualization
let tracker = logger.get_component_tracker();
let config = ChartConfig::new().with_chart_type(ChartType::Flowchart);
let generator = MermaidGenerator::new(config);
let diagram = generator.generate_diagram(tracker)?;

Supported chart types:

  • Flowchart - Component relationships and dependencies
  • Timeline - Execution order and timing
  • Gantt - Component durations and overlaps

View generated diagrams at mermaid.live or in VS Code with the Mermaid extension.

Documentation

📖 Comprehensive documentation is available in the Telelog Wiki

The wiki includes:

  • Getting started guides for both Rust and Python
  • Detailed feature documentation (profiling, component tracking, visualization)
  • Configuration and customization guides
  • Cookbook with real-world examples
  • Framework integration guides (Flask, FastAPI, Axum, Actix, etc.)
  • Complete API references
  • Migration guides from other logging libraries
  • Troubleshooting and FAQ

Examples

See the examples/ directory for comprehensive usage examples in both Rust and Python.

# Try the examples
cargo run --example 01_basic_logging
cargo run --example 04_component_tracking
cargo run --example 05_visualization

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. See the examples directory for comprehensive usage patterns.

License

This project is licensed under the MIT License.


Built with ❤️ by Vedant Asati

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

telelog_python-0.3.0.tar.gz (472.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

telelog_python-0.3.0-cp313-cp313-win_amd64.whl (308.0 kB view details)

Uploaded CPython 3.13Windows x86-64

telelog_python-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (512.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

telelog_python-0.3.0-cp313-cp313-macosx_11_0_arm64.whl (416.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

telelog_python-0.3.0-cp312-cp312-win_amd64.whl (308.3 kB view details)

Uploaded CPython 3.12Windows x86-64

telelog_python-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (512.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

telelog_python-0.3.0-cp312-cp312-macosx_11_0_arm64.whl (417.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

telelog_python-0.3.0-cp311-cp311-win_amd64.whl (310.2 kB view details)

Uploaded CPython 3.11Windows x86-64

telelog_python-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (515.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

telelog_python-0.3.0-cp311-cp311-macosx_11_0_arm64.whl (419.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

telelog_python-0.3.0-cp310-cp310-win_amd64.whl (309.9 kB view details)

Uploaded CPython 3.10Windows x86-64

telelog_python-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (515.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

telelog_python-0.3.0-cp310-cp310-macosx_11_0_arm64.whl (419.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

telelog_python-0.3.0-cp39-cp39-win_amd64.whl (311.3 kB view details)

Uploaded CPython 3.9Windows x86-64

telelog_python-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (516.6 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

telelog_python-0.3.0-cp39-cp39-macosx_11_0_arm64.whl (421.1 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file telelog_python-0.3.0.tar.gz.

File metadata

  • Download URL: telelog_python-0.3.0.tar.gz
  • Upload date:
  • Size: 472.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for telelog_python-0.3.0.tar.gz
Algorithm Hash digest
SHA256 cec3ea13f09d25f1d9e2c789c7f029f5303c21db3eddcdc254ffde19d17c80aa
MD5 84bbbb73428b28c5887c21f6a7e90475
BLAKE2b-256 d0a0e6d580a9bbf6c3073e04de0a9c4b9884017011b68165dcd5358edeef375d

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 54ae9dec9780cb369ffaf4e05fa1c14165433a58d49fa51cc43951cf01d94716
MD5 22c72c05069f14cfc026a4c0586798a0
BLAKE2b-256 c736298b40c5982de7cb8a5cb3f407d3847ad2dd0c1c5bb7ced705b59e5570e0

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fcaad7bc17ad096b2f4794419f08605f5c197b9759157de22f4954cb7c248016
MD5 5f0a84c4f04f90856a916180704026b2
BLAKE2b-256 d08bca35920b7660cccd916466969286b8e508b9c8ab87512de65f22da0ec5e2

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd3d8c0013fbd5a1a6a39a58c9f67051275602ea7a970d5ccabaa3c875b21062
MD5 9ed4d68735d63f3d8a81420ee1670b6f
BLAKE2b-256 8c34351a6c93cd1c547951aa96943f831a9a2f6d7d7278f6d60b78bccf05cfed

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e582ddc19be5ce505b56d89db395a616a7e614932edf2c05544d3ffcf001b114
MD5 c20b52a118a73828e5de0e7893cce205
BLAKE2b-256 fbb6d2570dd6597a949769fa27905e9a4d1d57fcec1f24898b3797b79a341ffc

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e235397d55291bbe416bb0bdd003ed37fd8efe54f3445dec55fb405cb625aedc
MD5 348c7c9e09e00aab8f8ed3b270da9fdf
BLAKE2b-256 7b7370740a7da5c96929974a204d46e9acbb6b88f621ce67e564db2d537576d7

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c07c61adb3b75d13ec6995758f2ad8a54b3be55db99620614b303dfd38639900
MD5 8b454bbcf279e0e1fea6687a3f144c4a
BLAKE2b-256 1812a0c8b9ecfdb1f17a1cffdebef90455e64d54d63538c91cfcdecb10dac0ac

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d7c88b335f10987f5a05cca92ea0dfb99bed295f0fec708f798b501491d23732
MD5 04f6fde269e7da8455e734a30b230a4a
BLAKE2b-256 156a29ac8b3f340223e321dd325141a5de2d6d2efcc95a54117d9bc41bbfbfeb

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b7d1a34e223186261437f5d619f92cd38a761d506103e226eb0606bd64049d48
MD5 6413218904a6b7d5d8b558af5c51407b
BLAKE2b-256 64411f0faf8cc822f2c6525c9d40bdaf389a9f57fc47b9f9851e1692a79c9b1b

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d84a862199578ef1a196e28adaa864111b493bf1f5d8090bf06d7ceb09b307f3
MD5 1f42dcf4c6f315dd4b9517c137a90bce
BLAKE2b-256 9685b2f775378b927675940a08dc958043d4ff71e98701f8818aebf77d1e9f31

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e0ad9acedabe586d3f1ee8fb412779c0171284d0606e31afce24a373ae6a1357
MD5 71d1caa4812baef272ec6b89a1880ad5
BLAKE2b-256 8dd891af0692be1b560d0838f6405079a0f989712abd9825086cc2e827edf107

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c346e12123bc6f411c921600bf0a4825374f3cf0dfb92349e620161c5b347d28
MD5 a558cf831f844b7fd9395c35b5c8baa4
BLAKE2b-256 e6dc8b0ec1ace50f54f8a567d88e6fd493c27c0f078f04fdd793ec26766808b6

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 38ace91a9bd7ddfe1fb384fcbba3b3698b1de6497985eceaef381e6ed7a7cca5
MD5 08cb40d5e941a713e44566d9432019dd
BLAKE2b-256 88d7c5c958aab0b9a60ccf5a403252c96d0f0a8d694152dba202714633ae2eae

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4a093cdb8d54701b5bc9fa33725e8b2048903f6670a3638ddb4f106a7e3fc2f7
MD5 6bbf86e2cebec3a732123ad8ec241a9a
BLAKE2b-256 857b76344278601fded1e58cd994594db9929ca7b61cfb0372bc7ded23ceec5f

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ca54ff809ed756829d7923b387cadb8bf14f35534379b92f56f12ac4373e6ae
MD5 8bd81a84059a47da1c10102a391c02d0
BLAKE2b-256 273e1e357accbe57a1a847db55669f741076079e0cc014aee3b9d6438d90d83c

See more details on using hashes here.

File details

Details for the file telelog_python-0.3.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for telelog_python-0.3.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0f579a2ec5f4db59a1161731afe6f57690d6769cdcccdb6547841890f437e2d2
MD5 742d62f6d348226a42a7ae2e1892fc8a
BLAKE2b-256 37f32cb14e3f61acfb036a46522cc610b23ec23caecfff3de4155e55dc1043fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page