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.0.tar.gz (2.8 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.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: visionlog-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 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.0.tar.gz
Algorithm Hash digest
SHA256 237dac8d5b2586201ef065fcd764226db0c82f47e969b75b10c0732b6325ec98
MD5 973cedf3cad5cfedf13feafc62b0db81
BLAKE2b-256 544224d3d728833851f244a42a3ea59f5df81588e26ffb8637e7dc75a5abcb42

See more details on using hashes here.

File details

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

File metadata

  • Download URL: visionlog-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 350d6cf903ae3cccdef49bb55307da6fe515106da21efaa5dff236939c4cff49
MD5 5cd53457eb3b55fcea933299ab5e1b09
BLAKE2b-256 95763f8f5918b9784fab17f32617e518d6390c6285c4d99b0f2db4a4ff3f29be

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