intensity-logger


Nameintensity-logger JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/idkconsole/intensity-logger
SummaryA logging utility for Python applications with customizable intensity
upload_time2024-05-22 07:37:44
maintainerNone
docs_urlNone
authoridkconsole, eagledev1337, homicide3301
requires_python>=3.6
licenseNone
keywords logging logger intensity color logs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Intensity Logger

A simple and flexible logging module with customizable intensity and color-coded output for enhanced readability.

## Table of Contents
- [Introduction](#introduction)
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage)
  - [Basic Usage](#basic-usage)
  - [Log Levels](#log-levels)
  - [Performance Timing](#performance-timing)
- [Contributing](#contributing)
- [License](#license)

## Introduction
Intensity Logger is a Python logging module designed to provide simple, color-coded logging output with customizable intensity. It helps to easily distinguish different log levels, such as debug, info, warning, error, success, and ratelimit.

## Features
- Color-coded log messages for easy readability.
- Support for different log levels: debug, info, warning, error, success, and ratelimit.
- Optional custom intensity to convert messages to uppercase.
- Lightweight and easy to integrate into any Python project.

## Installation
You can install Intensity Logger via pip:

```bash
pip install intensity-logger==0.1.2
```

## Usage
## Basic Usage

Here's a basic example to get you started with Intensity Logger:

```py
from intensity_logger import Logger

logger = Logger()

logger.debug("This is a debug message.")
logger.info("This is an info message.")
logger.warning("Warning issued.")
logger.error("An error has occurred.")
logger.success("Operation was successful.")
logger.ratelimit("Rate limit exceeded.")
```

## Log Levels
Intensity Logger supports various log levels, each with a different color:

- Debug: Detailed information, typically of interest only when diagnosing problems.
- Info: Confirmation that things are working as expected.
- Warning: An indication that something unexpected happened, or indicative of some problem in the near future.
- Error: Due to a more serious problem, the software has not been able to perform some function.
- Success: Indicates successful operations.
- Ratelimit: Warnings about rate limiting.

## Performance Timing
You can log the duration of an operation by passing `start` and `end` times:

```py
import time
from intensity_logger import Logger

logger = Logger()

start_time = time.time()
time.sleep(2)
end_time = time.time()

logger.success("Operation completed successfully.", start=start_time, end=end_time)
```

## Contributing

Contributions are welcome! If you have ideas for improvements or new features, feel free to open an issue or submit a pull request on GitHub.

1. Fork the repository.
2. Create your feature branch.
3. Commit your changes.
4. Push to the branch.
5. Open a pull request.

## License

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/idkconsole/intensity-logger",
    "name": "intensity-logger",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "logging logger intensity color logs",
    "author": "idkconsole, eagledev1337, homicide3301",
    "author_email": "idkconsole@proton.me",
    "download_url": "https://files.pythonhosted.org/packages/9d/b1/f507c20c2670b81683543ea90bb7aefe1f9b4b90e3bc762da7bf59cc72eb/intensity_logger-0.1.2.tar.gz",
    "platform": null,
    "description": "# Intensity Logger\r\n\r\nA simple and flexible logging module with customizable intensity and color-coded output for enhanced readability.\r\n\r\n## Table of Contents\r\n- [Introduction](#introduction)\r\n- [Features](#features)\r\n- [Installation](#installation)\r\n- [Usage](#usage)\r\n  - [Basic Usage](#basic-usage)\r\n  - [Log Levels](#log-levels)\r\n  - [Performance Timing](#performance-timing)\r\n- [Contributing](#contributing)\r\n- [License](#license)\r\n\r\n## Introduction\r\nIntensity Logger is a Python logging module designed to provide simple, color-coded logging output with customizable intensity. It helps to easily distinguish different log levels, such as debug, info, warning, error, success, and ratelimit.\r\n\r\n## Features\r\n- Color-coded log messages for easy readability.\r\n- Support for different log levels: debug, info, warning, error, success, and ratelimit.\r\n- Optional custom intensity to convert messages to uppercase.\r\n- Lightweight and easy to integrate into any Python project.\r\n\r\n## Installation\r\nYou can install Intensity Logger via pip:\r\n\r\n```bash\r\npip install intensity-logger==0.1.2\r\n```\r\n\r\n## Usage\r\n## Basic Usage\r\n\r\nHere's a basic example to get you started with Intensity Logger:\r\n\r\n```py\r\nfrom intensity_logger import Logger\r\n\r\nlogger = Logger()\r\n\r\nlogger.debug(\"This is a debug message.\")\r\nlogger.info(\"This is an info message.\")\r\nlogger.warning(\"Warning issued.\")\r\nlogger.error(\"An error has occurred.\")\r\nlogger.success(\"Operation was successful.\")\r\nlogger.ratelimit(\"Rate limit exceeded.\")\r\n```\r\n\r\n## Log Levels\r\nIntensity Logger supports various log levels, each with a different color:\r\n\r\n- Debug: Detailed information, typically of interest only when diagnosing problems.\r\n- Info: Confirmation that things are working as expected.\r\n- Warning: An indication that something unexpected happened, or indicative of some problem in the near future.\r\n- Error: Due to a more serious problem, the software has not been able to perform some function.\r\n- Success: Indicates successful operations.\r\n- Ratelimit: Warnings about rate limiting.\r\n\r\n## Performance Timing\r\nYou can log the duration of an operation by passing `start` and `end` times:\r\n\r\n```py\r\nimport time\r\nfrom intensity_logger import Logger\r\n\r\nlogger = Logger()\r\n\r\nstart_time = time.time()\r\ntime.sleep(2)\r\nend_time = time.time()\r\n\r\nlogger.success(\"Operation completed successfully.\", start=start_time, end=end_time)\r\n```\r\n\r\n## Contributing\r\n\r\nContributions are welcome! If you have ideas for improvements or new features, feel free to open an issue or submit a pull request on GitHub.\r\n\r\n1. Fork the repository.\r\n2. Create your feature branch.\r\n3. Commit your changes.\r\n4. Push to the branch.\r\n5. Open a pull request.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the LICENSE file for details.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A logging utility for Python applications with customizable intensity",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/idkconsole/intensity-logger"
    },
    "split_keywords": [
        "logging",
        "logger",
        "intensity",
        "color",
        "logs"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b918c8f7c3a1c97187816583fba16f363d45b9eabe76b5dafd506dd573e0175f",
                "md5": "88c8048b4f7917267a26ae10ecbfb976",
                "sha256": "41191ff68e4841e9c8fdfd2faabf7e72a761c73d28586f2aac8003d6e9118491"
            },
            "downloads": -1,
            "filename": "intensity_logger-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "88c8048b4f7917267a26ae10ecbfb976",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4390,
            "upload_time": "2024-05-22T07:37:42",
            "upload_time_iso_8601": "2024-05-22T07:37:42.367400Z",
            "url": "https://files.pythonhosted.org/packages/b9/18/c8f7c3a1c97187816583fba16f363d45b9eabe76b5dafd506dd573e0175f/intensity_logger-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9db1f507c20c2670b81683543ea90bb7aefe1f9b4b90e3bc762da7bf59cc72eb",
                "md5": "d8c20450a0e41dcd465f6f1a3a25b84b",
                "sha256": "f5aa5672eb251859e9a1d25ca09556afbfa2fd77767ecb958303382c92cc2f32"
            },
            "downloads": -1,
            "filename": "intensity_logger-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d8c20450a0e41dcd465f6f1a3a25b84b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4084,
            "upload_time": "2024-05-22T07:37:44",
            "upload_time_iso_8601": "2024-05-22T07:37:44.104566Z",
            "url": "https://files.pythonhosted.org/packages/9d/b1/f507c20c2670b81683543ea90bb7aefe1f9b4b90e3bc762da7bf59cc72eb/intensity_logger-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-22 07:37:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "idkconsole",
    "github_project": "intensity-logger",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "intensity-logger"
}
        
Elapsed time: 0.22877s