Skip to main content

A universal structured logging library for analytics tracking

Project description

Visionlog 🚀

A high-performance, structured logging library for analytics tracking.

Features

  • 🚀 Structured JSON Logging
  • 🔎 Easy Integration with OpenTelemetry
  • 🎨 Pretty Console Output with Loguru
  • Ultra-Fast JSON Serialization using orjson
  • 🛠 Command-Line Logging Tool

Installation

Install via pip

pip install visionlog

Install via Poetry

poetry add visionlog

🚀 Usage

1. Basic Example

from visionlog import get_logger

logger = get_logger("my-app")

logger.info("User login event", user="john_doe", action="login")
logger.warning("Suspicious activity detected", ip="192.168.1.1")
logger.error("Server crashed!", error_code=500)

2. CLI Usage

You can also log messages directly from the command line:

visionlog-cli --message "Quick log example"

🎯 Advanced Usage

Using Visionlog with OpenTelemetry

from visionlog import get_logger
from opentelemetry import trace

tracer = trace.get_tracer("visionlog-tracer")
logger = get_logger("my-app")

with tracer.start_as_current_span("http_request"):
    logger.info("Tracking request event", endpoint="/api/data", status=200)

Why Use Visionlog?

Super fast JSON serialization using orjson
Structured, formatted logs for analytics
Extensible with OpenTelemetry for tracing
Command-line logging for quick debugging


🛠 Development & Contribution

  1. Clone the repository:

    git clone https://github.com/szmyty/visionlog.git
    cd visionlog
    
  2. Install dependencies:

    poetry install
    
  3. Run the example:

    python examples/basic_usage.py
    

📜 License

Visionlog is released under the MIT License.

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

visionlog-0.1.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

visionlog-0.1.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file visionlog-0.1.1.tar.gz.

File metadata

  • Download URL: visionlog-0.1.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/24.3.0

File hashes

Hashes for visionlog-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fba1b9f6150f1ceb2356351160d9e2e7649b7cc0359ad72ac793d8fc91241be7
MD5 dccd138e1c3f6e45ba82794396b66530
BLAKE2b-256 9fd9a3d0ceb4105f8f135f5dd43c5933ca078da772c9ff5b33db7cd54d6ea94b

See more details on using hashes here.

File details

Details for the file visionlog-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: visionlog-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Darwin/24.3.0

File hashes

Hashes for visionlog-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c0872e23a2af32d4b44fee8b718ef6264d12615e400a68dc087c3220df41f39
MD5 b4db0c6f13c20c47df46e37a8f82e4a8
BLAKE2b-256 1670f0a6bcffd9a53539d6e999799b203982d8612aa298341dcd3407e55d41ee

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