Skip to main content

Hestia is a high-performance, structured logging system for Python applications. Supports async logging, ELK integration, structured JSON logs, and colorized console output.

Project description

Hestia Logger

A high-performance, structured logging system for Python applications.
Supports async logging, ELK integration, structured JSON logs, and colorized console output.

Key Features

  • Structured JSON & Human-Readable Logs (Optimized for ELK)
  • Dynamic Metadata Support (user_id, request_id, etc.)
  • Application-Aware Logging (get_logger("my_app"))
  • Multi-Thread & Multi-Process Friendly (thread_id, process_id)
  • Colored Console Output (INFO in green, ERROR in red, etc.)
  • Internal Logger for Debugging the Logging System
  • Supports File Rotation & Future Cloud Integration

Documentation

The full documentation is available on GitHub Pages.


Installation

pip install hestia-logger

Usage

1. Basic Setup

from hestia_logger.core.custom_logger import get_logger

logger = get_logger("my_application")

logger.info("Application started successfully!")
logger.warning("This is a warning!")
logger.error("Something went wrong!")
logger.critical("System is down!!!")

2. Adding Custom Metadata

logger = get_logger("my_application", metadata={"user_id": "12345", "request_id": "abcd-xyz"})

logger.info("User login successful")

Log File Structure

Hestia Logger creates two main log files:

File Format Purpose
app.log JSON Machine-readable (ELK)
all.log Text Human-readable debug logs

Log Colors (Console Output)

Log Level Color
DEBUG 🔵 Blue
INFO ⚫ Black
WARNING 🟡 Yellow
ERROR 🔴 Red
CRITICAL 🔥 Bold Red

Configuration

Hestia Logger supports environment-based configuration via .env or export:

# Environment Variables
ENVIRONMENT=local
LOG_LEVEL=INFO

Example Log Output

Console (Colorized) + all.log (Text Format)

2025-03-06 20:40:23 - my_application - INFO - Application started!

app.log (JSON Format - ELK Ready)

{
    "timestamp": "2025-03-06T20:40:23.286Z",
    "level": "INFO",
    "hostname": "server-1",
    "container_id": "N/A",
    "application": "my_application",
    "event": "Application started successfully!",
    "thread": 12345,
    "process": 56789,
    "uuid": "d3f5b2c1-4f27-46a8-b3d2-f4a7a5c3ef29",
    "metadata": {
        "user_id": "12345",
        "request_id": "abcd-xyz"
    }
}

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

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

hestia_logger-0.1.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hestia_logger-0.1.0-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file hestia_logger-0.1.0.tar.gz.

File metadata

  • Download URL: hestia_logger-0.1.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hestia_logger-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fd436239d779e08fde2ca0878e61850226a7d923f2c1f40423d76f8f25d83a5a
MD5 bee7e6349f53b42a675ade0675f3a436
BLAKE2b-256 7eb0fe6c6ed8a01bd4bd9423e4f2f9b2192e1352c0b02ae2e760b1a3cfdd0e26

See more details on using hashes here.

Provenance

The following attestation bundles were made for hestia_logger-0.1.0.tar.gz:

Publisher: publish-to-pypi.yml on fox-techniques/hestia-logger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hestia_logger-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hestia_logger-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hestia_logger-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 108dbcca7c28d48f4cf87760f4cb058ad91ca6bfb502c8338e1e5aea85ec0f14
MD5 285469cf9b2627f155ae005c90d23175
BLAKE2b-256 db88ceaf964c5996f20ff07f26b60187ea0e3e2b2765a23114abd89d58666f2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hestia_logger-0.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on fox-techniques/hestia-logger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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