Skip to main content

Secure, redactable, context-aware logger for security and DevOps workflows.

Project description

InsightLog (InsightLog101)

This is a secure, context-aware Python logging utility that provides advanced features for redacting sensitive data, exporting logs to encrypted formats, filtering by severity and tags, and generating tamper-evident audit trails.


Features

  • Redacts secrets using pattern and entropy-based detection
  • Dual output: human-readable console + structured JSON logs
  • Categorization and filtering by severity and tags
  • File, console, and encrypted audit log support
  • Tamper-evident hash-chained logs (optional)
  • Configurable via YAML, JSON, or environment variables
  • Supports CLI mode and decorator-based tracing

Installation

pip install git+https://github.com/kmukoo101/insightlog101.git

Or clone the repo and use:

pip install .

Basic Usage

from insightlog import InsightLogger

logger = InsightLogger(name="myapp")
logger.info("User logged in", extra={"user_id": "123"})
logger.warning("Suspicious input", extra={"input": "password=secret123"})

Config

You can load settings from config.yml, JSON, or environment variables.

Example config.yml:

level: DEBUG
console: true
file: logs/app.log
redact_patterns:
  - password=.*?
  - secret_key=\w+
from insightlog import load_config
load_config("config.yml")

CLI Support (Optional)

This tool provides a basic CLI entry point for structured logging, useful in shell scripts or quick diagnostics.

python -m insightlog --message "System check complete" --level INFO --tag healthcheck

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

insightlog101-0.1.12.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.

insightlog101-0.1.12-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: insightlog101-0.1.12.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for insightlog101-0.1.12.tar.gz
Algorithm Hash digest
SHA256 7a7b163671794b41bb882cb93bae2c08341e4d95290d47feaf1b137cdd9a343e
MD5 58ec8e78d2dd679f3ad18cf00d39d22b
BLAKE2b-256 14a3a6fa0f8839da27f3a1470a5aa8b0625bd956ebc012c86528dc2c3a74fc5e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: insightlog101-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for insightlog101-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 b54902dee6dba4967af9247e07900b2f6412d9c55941ba4c35c6e197d1c245b0
MD5 88b1c196af99e4cb8b812160bffb9f5c
BLAKE2b-256 d97a3ce11b9be37841950b76ad6db307e1891ffee2e689b7c1e07fd08b242db9

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