{"id":26244236,"url":"https://github.com/fox-techniques/hestia-logger","last_synced_at":"2026-03-11T19:05:53.901Z","repository":{"id":282130731,"uuid":"942687276","full_name":"fox-techniques/hestia-logger","owner":"fox-techniques","description":"An asynchronous, high-performance logging system for Python applications","archived":false,"fork":false,"pushed_at":"2025-03-12T23:51:12.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T00:28:06.935Z","etag":null,"topics":["asynchronous","elasticsearch","grafana","kibana","logging","logstash","monitoring","multithreaded","observability","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fox-techniques.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-04T14:07:11.000Z","updated_at":"2025-03-12T23:51:15.000Z","dependencies_parsed_at":"2025-03-13T00:28:09.240Z","dependency_job_id":"bcdec871-8afb-4065-8a5a-31931405b07e","html_url":"https://github.com/fox-techniques/hestia-logger","commit_stats":null,"previous_names":["fox-techniques/hestia-logger"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-techniques%2Fhestia-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-techniques%2Fhestia-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-techniques%2Fhestia-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fox-techniques%2Fhestia-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fox-techniques","download_url":"https://codeload.github.com/fox-techniques/hestia-logger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243392326,"owners_count":20283565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asynchronous","elasticsearch","grafana","kibana","logging","logstash","monitoring","multithreaded","observability","python"],"created_at":"2025-03-13T11:18:52.546Z","updated_at":"2026-03-11T19:05:53.895Z","avatar_url":"https://github.com/fox-techniques.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HESTIA Logger \n\n[![Python](https://img.shields.io/badge/Python-3.11%2B-darkcyan)](https://pypi.org/project/hestia-logger/)\n[![PyPI - Version](https://img.shields.io/pypi/v/hestia-logger?label=PyPI%20Version\u0026color=green)](https://pypi.org/project/hestia-logger/)\n[![PyPI Downloads](https://static.pepy.tech/badge/hestia-logger)](https://pepy.tech/projects/hestia-logger)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache2.0-orange.svg)](https://github.com/fox-techniques/hestia-logger/blob/main/LICENSE)\n[![GitHub](https://img.shields.io/badge/GitHub-hestia--logger-181717?logo=github)](https://github.com/fox-techniques/hestia-logger)\n\n\n**A high-performance, structured logging system for Python applications.**  \nSupports **async logging, Elastic Stack integration, structured JSON logs, and colorized console output.**\n\n## Key Features\n\n- **Structured JSON \u0026 Human-Readable Logs** (Optimized for Elastic Stack)  \n- **Dynamic Metadata Support** (`user_id`, `request_id`, etc.)  \n- **Application-Aware Logging** (`get_logger(\"my_app\")`)  \n- **Multi-Thread \u0026 Multi-Process Friendly** (`thread_id`, `process_id`)  \n- **Colored Console Output** (`INFO` in green, `ERROR` in red, etc.)  \n- **Internal Logger for Debugging the Logging System**  \n- **Supports File Rotation \u0026 Future Cloud Integration**  \n\n---\n\n## Documentation\n\nThe full documentation is available on [GitHub Pages](https://fox-techniques.github.io/hestia-logger/).\n\n---\n\n##  Installation\n\n```bash\npip install hestia-logger\n```\n\n##  Usage\n\n**1. Basic Setup**\n\n```python\nfrom hestia_logger import get_logger\n\n# Get a logger instance\nlogger = get_logger(\"development\")\n\n# Log messages with different levels\nlogger.debug(\"This is a DEBUG log\")\nlogger.info(\"Application started successfully\")\nlogger.warning(\"Low disk space warning\")\nlogger.error(\"Failed to connect to database\")\nlogger.critical(\"System is down!\")\n```\n\n**2. Decorator Example**\n\n```python \nfrom hestia_logger import get_logger\nfrom hestia_logger.decorators import log_execution\n\n# Initialize the logger\nlogger = get_logger(\"decorator\")\n\n@log_execution\ndef add_numbers(a, b):\n     \"\"\"Adds two numbers and returns the result.\"\"\"\n     return a + b\n\n@log_execution\ndef simulate_task():\n     \"\"\"Simulates a task that takes time.\"\"\"\n     import time\n     time.sleep(2)\n     return \"Task completed!\"\n\n# Call the functions\nif __name__ == \"__main__\":\n     result = add_numbers(5, 10)\n     logger.info(f\"Result: {result}\")\n\n     task_status = simulate_task()\n     logger.info(f\"Task Status: {task_status}\")\n\n```\n\n\n**3. Adding Custom Metadata**\n\n```python\nfrom hestia_logger import get_logger\n\nlogger = get_logger(\"my_application\", metadata={\"user_id\": \"12345\", \n                                                \"request_id\": \"abcd-xyz\"})\n\nlogger.info(\"User login successful\")\n```\n\n## Log File Structure\n\nHESTIA Logger creates two main log files:\n\n\n|File|\tFormat|\tPurpose|\n|---|---|---|\n|**app.log**\t|JSON\t|Machine-readable (Elastic Stack)|\n|**all.log**\t|Text\t|Human-readable debug logs|\n\n## Log Colors (Console Output)\n\n|Log Level|\tColor|\n|---|---|\n|DEBUG|\t🔵 Blue|\n|INFO|\t⚫ Black|\n|WARNING|\t🟡 Yellow|\n|ERROR|\t🔴 Red|\n|CRITICAL|\t🔥 Bold Red|\n\n## Configuration\n\nHESTIA Logger supports environment-based configuration via .env or export:\n\n```bash\n# Environment Variables\nENVIRONMENT=local\nLOG_LEVEL=INFO\n```\n\n## Example Log Output\n\n### Console (Colorized) +  all.log (Text Format)\n\n```yaml\n2025-03-06 20:40:23 - my_application - INFO - Application started!\n```\n\n### app.log (JSON Format - Elastic Stack Ready)\n\n```json\n{\n    \"timestamp\": \"2025-03-06T20:40:23.286Z\",\n    \"level\": \"INFO\",\n    \"hostname\": \"server-1\",\n    \"container_id\": \"N/A\",\n    \"application\": \"my_application\",\n    \"event\": \"Application started successfully!\",\n    \"thread\": 12345,\n    \"process\": 56789,\n    \"uuid\": \"d3f5b2c1-4f27-46a8-b3d2-f4a7a5c3ef29\",\n    \"metadata\": {\n        \"user_id\": \"12345\",\n        \"request_id\": \"abcd-xyz\"\n    }\n}\n```\n\n## License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](https://github.com/fox-techniques/hestia-logger/blob/main/LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffox-techniques%2Fhestia-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffox-techniques%2Fhestia-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffox-techniques%2Fhestia-logger/lists"}