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 native Rust performance
  • Minimal Overhead - Efficient logging with optional system monitoring

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
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.

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.1.0.tar.gz (92.0 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.1.0-cp313-cp313-win_amd64.whl (276.5 kB view details)

Uploaded CPython 3.13Windows x86-64

telelog_python-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (479.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

telelog_python-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (379.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

telelog_python-0.1.0-cp312-cp312-win_amd64.whl (276.2 kB view details)

Uploaded CPython 3.12Windows x86-64

telelog_python-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (480.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

telelog_python-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (379.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

telelog_python-0.1.0-cp311-cp311-win_amd64.whl (276.2 kB view details)

Uploaded CPython 3.11Windows x86-64

telelog_python-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (480.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

telelog_python-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (382.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

telelog_python-0.1.0-cp310-cp310-win_amd64.whl (276.1 kB view details)

Uploaded CPython 3.10Windows x86-64

telelog_python-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (480.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

telelog_python-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (383.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

telelog_python-0.1.0-cp39-cp39-win_amd64.whl (277.9 kB view details)

Uploaded CPython 3.9Windows x86-64

telelog_python-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (481.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

telelog_python-0.1.0-cp39-cp39-macosx_11_0_arm64.whl (384.9 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for telelog_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7ecc151a0a652543781ce63716bdb41ef433dcb05ae86ae76643fcbb2938256a
MD5 d5b8f39471775bee3cecd7343e3ca08c
BLAKE2b-256 0cfb3f7d9aec44bff90cb5aaf44c08f7aa3a2887c13c634393fc62176c92d877

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 102a9bba52c4057d6f9e3dc597a4aae2934cde83c94fcad59ccf38790a6d4dae
MD5 8df487f966b591272c740e937d52442f
BLAKE2b-256 18eb6f2b9f9bb4cff84fe4ef5f227fa0f628be89a19afb724baecc582af2578a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cc1e903d00fed197270dab1d07833f1c61e96e4d14c095cb6ac8a946e8fc0b94
MD5 03c0e603af067245c1fb23f0ac90a45b
BLAKE2b-256 394f73dafcb56a5996379ce518de509d0ee70d9337c1e8f396c60914a8efdb76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cbc3f7904e072564cb1a58b49e2e2aff28a3f73d02c98be5b1462dd7dd9733d0
MD5 e0ff9f586a6f17e508dd4a87ad4ebdd3
BLAKE2b-256 38ce352a51b015db48552ca83af547f9fdaae6159d79c91cd65b5c61c0b7dc2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 888228a9eedb6690a7cce78e298fd3087fc4447649bc9df907d38c19d069cc13
MD5 6bc689a595bce52b6f1d9c1132d5c6cf
BLAKE2b-256 abf8b668822505612a5ad53d1548634bc38fe9cc4a0f3536952bb40e3d34fd4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a6267406f13626cbc70880dfad22a78d9dcc5d0cd857ec5f4828b29ed5473e18
MD5 38aff8792c637e7882c8a8fed30763cf
BLAKE2b-256 16fb5abe1e1b9e6dbe04e97b2aedcbfaf5a4da24efcb1ef9443b273edfe2d7ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0ce9bfe8868330bf1f0140c1a8a48c3dc6b73b851cbe606dd9a2dfe11c7babe6
MD5 ebd083857649d74c2d71fc4ddd17b720
BLAKE2b-256 226669815c5d3c329f9b9b50ea62b546f869c69a134f80e82658c4548e53a05f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b88ab45a4b8b12f9b36a7d9b9f859baf273de406f69d5d35c0edc6d1c58f80cb
MD5 10549825acd5cad497f4494afc41d65d
BLAKE2b-256 8eb4e0312b55ee9714e49267c96d3c7c4095dc645f79e2a62a9a07d40687b690

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3827ac3894a6d0877c5b7f5214a9d0367c2906e80512ef39860aad2b848e1df0
MD5 9af354898cf337c8873266e8a4def238
BLAKE2b-256 b8c913b904a2288c94e64abfe7535aba733488d24637c16a53791da3bbf40fce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d45d9e631c4199a03a7712b702400541d78c4fc740d6f10f721dad1b249e8280
MD5 05a470c70346751bcf71b8e86a28a75a
BLAKE2b-256 ebafd4327c18fbb7c3770f5b65f58cd8ae6774246677449737f7345872f7b31c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 85aa03a622ce15c91f93e69e505752ce7e8f13aa47b8363279fa6eb5d7ff0cbd
MD5 80dc782dd25d23d3b0e1abc3f2423d1f
BLAKE2b-256 507ad4e5b6f41bad818265d4179f0d9b3da222bbccf8e8579e2534705dc0da8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bfb516d8a18555f78152834a41601f21befed97f4f9ef6724b78684d047c269b
MD5 84eae53276947fee4384311af0957f29
BLAKE2b-256 0b8f0240094e98041286ff67b6301e66ce6fa0fac00448598fddb612656900f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c1a95ada610bdf38e7de092c8724beadbbc17314d58a2d5947ab8cf990ef1db
MD5 d5d3aa4787af270ea46d29e702d20e33
BLAKE2b-256 5ddc56ec3aca68411c893498309848c4b22ec26900109501023a28b61f569338

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6e18189584e897b850f80d973c0313763e53a23a4facd4bf4b48344b9fa51e89
MD5 d770731ac505858574a1e47c02e6cf65
BLAKE2b-256 9d3cb8edb789fb28f2f43e01823f20b34cd5909b83b08bd0865dcd0331be628b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8ecba3f13072dc6cd79b90d5d319ff1e001d7e238363dea7c2595a815402927d
MD5 f68cdd4a2b8f87bf392f9522ff855ac4
BLAKE2b-256 4770d932fe2772e616c0e82a15dea7296bbb579d4fd9354072c0486f2af2d7c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for telelog_python-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 527437ec9ffc19b072c4225830ea2976d28f9a8271186890e1a5427844948314
MD5 13ac1998862c4125bb2ef258370274b4
BLAKE2b-256 a4b33f307ea1b26c3eb8aea0e76695d815e9b4099e12f6d4f6d4aab878efb66d

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