Skip to main content

Librería personalizada para logging con colores, con informacion de fecha - hora de ejecución y linea ejecutable (opcional)

Project description

LogsColor

Logscolor is a lightweight and easy-to-use open-source library for creating logs with customizable colors in Python. Ideal for developers looking to simplify tracking and debugging in their projects.

  • Colored log messages.
  • Different log levels (INFO, WARNING, ERROR, TRACE).
  • Optional: Display the line of code where the message was generated.

Installation

To install logscolor, simply run the following command:

pip install logscolor

Then, in your project, import the logging functions:

from logscolor.logscl import info, error, trace, warning, infoL, errorL, traceL, warningL

With this, you'll be able to use the different logging levels in your code.

Basic Usage

Import SimpleLogs into your project:

from logscolor.logscl import info, warning, error, trace

info("Information message")
warning("Warning message")
error("Error message")
trace("Debug message")

If you want to include information about the line where the message was generated, use the functions with the L suffix:

from simpleLogs import infoL, warningL, errorL, traceL

infoL("Information with line number")

Features

  • Customizable colors: Each log level has a unique color for easier visual identification.
  • Enriched format: Displays the date, time, and optionally the line of origin.
  • Lightweight and easy to integrate: Ideal for both large and small projects.
  • Support for advanced levels: Includes traceability (trace) for detailed debugging.
  • Easy integration: Designed to be a quick and simple replacement for print().

Supported Log Levels

SimpleLogs supports the following log levels, each with custom colors for better visibility:

Level Description Variants
INFO Informational messages. info, infoL
WARNING Warnings about potential issues. warning, warningL
ERROR Critical error messages. error, errorL
TRACE Detailed debugging messages. trace, traceL

Images

alt text

Real Examples

alt text

Requirements

  • Python 3.7 or higher
  • colorama

License

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

Contact

Created by Pablo Vega Castro. If you have any questions or suggestions, feel free to contact me at pablovegac.93@gmail.com.

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

logscolor-1.3.tar.gz (5.8 MB view details)

Uploaded Source

Built Distribution

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

logscolor-1.3-py3-none-any.whl (5.8 MB view details)

Uploaded Python 3

File details

Details for the file logscolor-1.3.tar.gz.

File metadata

  • Download URL: logscolor-1.3.tar.gz
  • Upload date:
  • Size: 5.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for logscolor-1.3.tar.gz
Algorithm Hash digest
SHA256 6815468eaa147f7b7046b2190dc7aa622d83d1c001ff0edffac02f1c8f1a24fe
MD5 5455b1b285e172e276beb4fef3033140
BLAKE2b-256 18ede766ed1e8f016bf802ba12b56d234691a4f23abee272e8deac5f8326778d

See more details on using hashes here.

File details

Details for the file logscolor-1.3-py3-none-any.whl.

File metadata

  • Download URL: logscolor-1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for logscolor-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dbe64927eebed702f908ccd5401c3439d3aee27d7906e4ee796b674beecb7354
MD5 a0a05365c69522b8eee934e15edb8b53
BLAKE2b-256 c328542d70dbcf635672aa7270eb7cf3af32c8f4056410bbfcc128224358a8a4

See more details on using hashes here.

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