Skip to main content

A lightweight audit logging library with pluggable backends

Project description

Litewave Audit Library

Internal audit logging library for Litewave services.

Usage

from litewave_audit_lib.log_factory import get_logger

# Get a logger with NATS backend
logger = get_logger(
    nats_connection_url="nats://username:password@your-nats-server:4222"
)

# Log an audit event
logger.log(
    who="user@email.com",
    resource="document",
    action="view",
    location="cloud",
    request_context={"ip": "127.0.0.1"},
    context={"document_id": "doc123"},
    client={}
)

## Features

- Automatic reconnection handling
- Connection retry logic
- Proper error handling and logging
- Type hints for better IDE support
- Automatic cleanup of NATS connections

## Dependencies

- nats-py (for NATS backend)

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

litewave_audit_lib-0.1.9.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

litewave_audit_lib-0.1.9-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file litewave_audit_lib-0.1.9.tar.gz.

File metadata

  • Download URL: litewave_audit_lib-0.1.9.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for litewave_audit_lib-0.1.9.tar.gz
Algorithm Hash digest
SHA256 fb22a83ab9bfe3cd7b5a045e1f49b5813cd44caf54ebef8ca10e271ab4f25ce1
MD5 36d7375d0fba99de7444dcd5a62f0e2d
BLAKE2b-256 1b665c742648bd4b7bd14be65f9adba88d8c7dbd0d95f3921095e33381680eb1

See more details on using hashes here.

File details

Details for the file litewave_audit_lib-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for litewave_audit_lib-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 a110a9c69c5e7956b76b987cf0602f21bbd3d2c3908dcaa313ca0a3d4319e55e
MD5 68acb3bb3a87ce5b35729728b790b0b0
BLAKE2b-256 78e58965fb7bb4c3c85f8e1ca91c6da0c3d29d874aff28b523d896b250f68424

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