Skip to main content

A simple and colorful logging utility for console only with support for context manager and no file logging.

Project description

Logita

Logita es una utilidad ligera y personalizable de logging en Python diseñada para mejorar la impresión de mensajes en consola exclusivamente, con soporte para colores opcionales y manejo de contexto para uso con with.

Características

  • Imprime mensajes de log con timestamp en la consola.
  • Soporte para múltiples niveles de log: debug, info, success, warning, error, critical y exception.
  • Salida con colores opcionales usando colorama.
  • No usa logging a archivos, solo consola para mayor simplicidad.
  • Permite impresión con o sin salto de línea (line=False).
  • Soporte para uso con contexto (with).

Instalación

pip install logita

Asegúrate de tener colorama instalado:

pip install colorama

Uso

from logita import Logita

with Logita(use_colors=True) as log:
    log.info("Mensaje informativo")
    log.success("Operación exitosa")
    log.warning("Advertencia importante")
    log.error("Ocurrió un error")
    log.debug("Detalles para debugging", line=False)
    log.debug(" -> continuación sin salto de línea")
    log.critical("Problema crítico")
    log.exception("Excepción ocurrida")

Parámetros del constructor

  • use_colors (bool): Indica si se usan colores en la consola (por defecto True).

Licencia

MIT License

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

logita-1.2.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

logita-1.2.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file logita-1.2.0.tar.gz.

File metadata

  • Download URL: logita-1.2.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for logita-1.2.0.tar.gz
Algorithm Hash digest
SHA256 5c6c63f280ce3640e07f6d6daf793839e4d459c254c08dcf5d50186f3c6a6726
MD5 d3d43c41572d791a9ca1aa8abadbd39f
BLAKE2b-256 7e30900e77c42830e6231985eabd5e007fa018dbe5e3681bfdf3a7fca6a934b2

See more details on using hashes here.

File details

Details for the file logita-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: logita-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for logita-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d321cdefc7202814c570c04e9e1da09d342158596802fb2c81e06a8ea2de12ca
MD5 e5d89916d60d04166d67db1d3b74c8e1
BLAKE2b-256 7a27b900815c39fdd8de1309ad93f3e02f550cc29484d25acd9a365da1538536

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