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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file insightlog101-0.1.8.tar.gz.
File metadata
- Download URL: insightlog101-0.1.8.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddef27635e123412234b785013d70147945153f9b847b6e9201589ec217a7cec
|
|
| MD5 |
574268aed8e4948d21d150b55d1b60c2
|
|
| BLAKE2b-256 |
32c72a7b23f1269e80125def4a26af476528b2476e4bd135ac380c6d1da7b62d
|
File details
Details for the file insightlog101-0.1.8-py3-none-any.whl.
File metadata
- Download URL: insightlog101-0.1.8-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a63626ec49cbd03bb11e94571569e93cbb49fa7f5d87248c2918e2c916a1e72
|
|
| MD5 |
1103ce526bc149f6dec20c0923d0ba09
|
|
| BLAKE2b-256 |
d1d54de086f314a1d9c872f4cb6f6e16592980ed603e86d5a76781e7c70aa915
|