pyecholog


Namepyecholog JSON
Version 3.0.4 PyPI version JSON
download
home_pageNone
SummaryEchoLog: colorful, configurable logging with JSON and rotation
upload_time2025-08-28 22:02:48
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords logging logger color json rotation python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # EchoLog

**EchoLog** is a modern, colorful logging library for Python with:
- Color-coded console output
- Daily log files
- Global level filtering
- Optional JSON output
- Size-based rotation with backups
- Retention policy by days
- In-memory ring buffer
- Custom handlers for integrations (e.g., send to webhook)

## Install
```bash
pip install echolog
````

## Quick Start

```python
from echolog import Logger, LogLevel

logger = Logger(
    name="MyApp",
    level=LogLevel.INFO,
    color=True,
    log_dir="logs",
    json_output=False,
    rotation={"type": "size", "max_bytes": 1_000_000, "backup_count": 5},
    retention_days=14,
)

logger.info("Application started")
logger.warning("This is a warning")
logger.error("Something failed")

# Change level dynamically
logger.set_level("DEBUG")
logger.debug("Debug details")

# Add a custom handler
logger.add_handler(lambda rec: print("[HOOK]", rec["level"], rec["message"]))
```

## JSON Output

```python
Logger(json_output=True).info("Structured log")
```

## Disable Colors

```python
logger.disable_color()
```

## Read Current Log File

```python
print("Log file:", logger.file_name())
print("Lines:", logger.get_logs()[:5])
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pyecholog",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "logging, logger, color, json, rotation, python",
    "author": null,
    "author_email": "Aymene Boudali <boudaliaymene4@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/02/0b/49d1a52f8ca7925d0a92e9806a73680658da1123bbc5c02b1e82607fc5ca/pyecholog-3.0.4.tar.gz",
    "platform": null,
    "description": "# EchoLog\r\n\r\n**EchoLog** is a modern, colorful logging library for Python with:\r\n- Color-coded console output\r\n- Daily log files\r\n- Global level filtering\r\n- Optional JSON output\r\n- Size-based rotation with backups\r\n- Retention policy by days\r\n- In-memory ring buffer\r\n- Custom handlers for integrations (e.g., send to webhook)\r\n\r\n## Install\r\n```bash\r\npip install echolog\r\n````\r\n\r\n## Quick Start\r\n\r\n```python\r\nfrom echolog import Logger, LogLevel\r\n\r\nlogger = Logger(\r\n    name=\"MyApp\",\r\n    level=LogLevel.INFO,\r\n    color=True,\r\n    log_dir=\"logs\",\r\n    json_output=False,\r\n    rotation={\"type\": \"size\", \"max_bytes\": 1_000_000, \"backup_count\": 5},\r\n    retention_days=14,\r\n)\r\n\r\nlogger.info(\"Application started\")\r\nlogger.warning(\"This is a warning\")\r\nlogger.error(\"Something failed\")\r\n\r\n# Change level dynamically\r\nlogger.set_level(\"DEBUG\")\r\nlogger.debug(\"Debug details\")\r\n\r\n# Add a custom handler\r\nlogger.add_handler(lambda rec: print(\"[HOOK]\", rec[\"level\"], rec[\"message\"]))\r\n```\r\n\r\n## JSON Output\r\n\r\n```python\r\nLogger(json_output=True).info(\"Structured log\")\r\n```\r\n\r\n## Disable Colors\r\n\r\n```python\r\nlogger.disable_color()\r\n```\r\n\r\n## Read Current Log File\r\n\r\n```python\r\nprint(\"Log file:\", logger.file_name())\r\nprint(\"Lines:\", logger.get_logs()[:5])\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "EchoLog: colorful, configurable logging with JSON and rotation",
    "version": "3.0.4",
    "project_urls": {
        "Homepage": "https://github.com/Aymene21/echolog",
        "Issues": "https://github.com/Aymene21/echolog/issues",
        "Repository": "https://github.com/Aymene21/echolog"
    },
    "split_keywords": [
        "logging",
        " logger",
        " color",
        " json",
        " rotation",
        " python"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ed61708ff3f4faad567b775fc8f1f358f4b2265e4db441354fc6832e20891e9b",
                "md5": "254cfe654e7dc41a37bac9420c563ddb",
                "sha256": "52ef76f9c97f54c6deb88f66e0268b02a246f31156540cfc0a59d4a845dd0342"
            },
            "downloads": -1,
            "filename": "pyecholog-3.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "254cfe654e7dc41a37bac9420c563ddb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6382,
            "upload_time": "2025-08-28T22:02:48",
            "upload_time_iso_8601": "2025-08-28T22:02:48.011391Z",
            "url": "https://files.pythonhosted.org/packages/ed/61/708ff3f4faad567b775fc8f1f358f4b2265e4db441354fc6832e20891e9b/pyecholog-3.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "020b49d1a52f8ca7925d0a92e9806a73680658da1123bbc5c02b1e82607fc5ca",
                "md5": "78a681696ab5a225de2acdb5e8a6a5d3",
                "sha256": "11a207ec9275e0e33b1930163a6321a19be5f6ec5401fb353688ba94ce6d4f65"
            },
            "downloads": -1,
            "filename": "pyecholog-3.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "78a681696ab5a225de2acdb5e8a6a5d3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6203,
            "upload_time": "2025-08-28T22:02:48",
            "upload_time_iso_8601": "2025-08-28T22:02:48.951432Z",
            "url": "https://files.pythonhosted.org/packages/02/0b/49d1a52f8ca7925d0a92e9806a73680658da1123bbc5c02b1e82607fc5ca/pyecholog-3.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-28 22:02:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Aymene21",
    "github_project": "echolog",
    "github_not_found": true,
    "lcname": "pyecholog"
}
        
Elapsed time: 1.12357s