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.4.tar.gz (8.2 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.4-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: litewave_audit_lib-0.1.4.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for litewave_audit_lib-0.1.4.tar.gz
Algorithm Hash digest
SHA256 57354dae8b91fc430c2787ed91a5e4d89ad26c3a17d894befa43228b9477506a
MD5 392dcf56cffc60fbe034a8e6a55fff77
BLAKE2b-256 68179ad080c27e5065b3bdfd09cd4f3a350c5edb5876dcc149baffecb38cba39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for litewave_audit_lib-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 df12786c8e4aa3f5f8cd9a5c65bd246bb10acc8a964f3eae417d0580027988c4
MD5 7e212140debcf310fd33c17b52d7bc61
BLAKE2b-256 30e184258ae65b14595e770f3ffccaf5ddbaa9b64ed9e1071a393bd12873046d

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