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.10.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.10-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: insightlog101-0.1.10.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.10.tar.gz
Algorithm Hash digest
SHA256 03cb8b51a4ba18774dff5266c66ca3310c59595ef53f07f4de59a7b07eedfe6b
MD5 49168cd15ce57c4ca7e90a46adb27411
BLAKE2b-256 364b502ba0f916817b4a562a0a3611e293abf1e0687709b716aeae3dfa210505

See more details on using hashes here.

File details

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

File metadata

  • Download URL: insightlog101-0.1.10-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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 7d7a59620ede84ae2778eca72acdf8863dcffe5a6e00c495effe549b7e8891b6
MD5 470b1244545ef802ebc778821998d694
BLAKE2b-256 8729536eb2bf1911a9e3990cd0c6d7e37d3b19c0a8e7c7b236405f9c1b72d12d

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