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.12.tar.gz (8.4 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.12-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: litewave_audit_lib-0.1.12.tar.gz
  • Upload date:
  • Size: 8.4 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.12.tar.gz
Algorithm Hash digest
SHA256 3239d0c4726b32d553d1c21ccb9e7b79d313546e0c373caa25f781d7c39c328f
MD5 1a2f5ea519709cbc225abf94ad525dd9
BLAKE2b-256 abe1937385f9ed46e06d58a256e78ec647e69e2edd100198dc532d7737c98e7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for litewave_audit_lib-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 e0ef02d5cb92475a3fa4dbc67d1d2e07c4b4614f219257939e2d63aacd941ebc
MD5 ba9df8152fba94b3c8062e53b00834b4
BLAKE2b-256 7f25746babfc9d36ffa391b67b6a1ba3e2d227066f523aa6fc57ed55cfdadf18

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