Skip to main content

lognitor

Official Lognitor SDK for Python — log management, error tracking, and monitoring.

Install

pip install lognitor

Quick Start

import lognitor

lognitor.init(
    api_key="your-api-key",
    service="my-python-app",
    environment="production",
)

lognitor.info("Server started", metadata={"port": 8000})

Log Levels

lognitor.debug("Cache miss", metadata={"key": "user:123"})
lognitor.info("Order created", metadata={"order_id": "ord_456"})
lognitor.warn("Rate limit approaching")
lognitor.error("Payment failed", error=ValueError("Card declined"))
lognitor.fatal("Database corrupted")

Error Tracking

try:
    process_payment(order)
except Exception as e:
    lognitor.capture_exception(e, metadata={"order_id": order.id})

User Context

lognitor.set_user({"id": "user_123", "email": "alice@example.com"})
lognitor.clear_user()

Framework Integrations

Django

# settings.py
MIDDLEWARE = ["lognitor.integrations.django.LognitorMiddleware", ...]
LOGNITOR = {"api_key": "your-key", "service": "my-django-app", "environment": "production"}

Flask

from lognitor.integrations.flask import init_app
client = init_app(app, api_key="your-key", service="my-flask-app")

FastAPI

from lognitor.integrations.fastapi import LognitorMiddleware
app.add_middleware(LognitorMiddleware, api_key="your-key", service="my-fastapi-app")

Configuration

Option Default Description
api_key required Project API key
service None Service name
environment None Environment
batch_size 25 Logs per batch
flush_interval 5.0 Auto-flush interval (seconds)
max_retries 3 Retry count
min_level None Minimum level to send
redact_patterns [] PII patterns to redact
before_send None Transform/filter callback

More

  • Child loggers: lognitor.child(service="payments")
  • Timers: t = lognitor.start_timer(); t.end("Done")
  • Heartbeat: lognitor.heartbeat("token").wrap(lambda: job())
  • Releases: lognitor.register_release(version="2.0")
  • Python logging bridge: from lognitor.logging_handler import LogHandler

Full documentation: docs.lognitor.com

Compatibility

Python 3.8+. No external dependencies.

Metadata

Release files for lognitor 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lognitor 1.0.3
File Size Uploaded Provenance Actions
lognitor-1.0.3.tar.gz 20.7 kB Without provenance Details for lognitor-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lognitor 1.0.3
File Interpreter ABI Platform Actions
lognitor-1.0.3-py3-none-any.whl Python 3 none any Details for lognitor-1.0.3-py3-none-any.whl

Total release size: 47.1 kB

Release files / lognitor-1.0.3.tar.gz

Download URL lognitor-1.0.3.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8dee245563b4c72f546aa1bb687021ef7c50df8f54cd47161780fe352744ed98
BLAKE2b-256 checksum
How to use checksums
3beb8f6502de1ff3c704d337ca4cab63d524649ba3745f0d3e234a0b63f92454
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / lognitor-1.0.3-py3-none-any.whl

Download URL lognitor-1.0.3-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3ec62c5b9e6bcf2ffac8cc3e322d10812ea9ba5f15f91dbc48f7ca327dbb5c6
BLAKE2b-256 checksum
How to use checksums
415e3cb0ee6a71812229ae12c7f6dd25386ae5088f8f5d0546257dfc78c47174
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for lognitor 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page