Skip to main content

A simple and colorful logging utility for console and file logging.

Project description

Logita

Logita is a lightweight and customizable Python logging utility designed to enhance console and file-based logging with optional colorized output.

Features

  • Print log messages with timestamps to the console.
  • Support for multiple log levels: info, success, error, warning, debug, critical, and exception.
  • Optional color-coded output using colorama.
  • Optional file logging with configurable filename and format.
  • Dynamic log level control.

Installation

pip install logita

Make sure you have colorama installed:

pip install colorama

Usage

from logita import Logita

log = Logita(log_to_file=True, log_filename="myapp.log", print_to_console=True, use_colors=True)

log.info("This is an info message")
log.success("This indicates success")
log.warning("This is a warning")
log.error("This is an error")
log.debug("Debugging details")
log.critical("Critical issue")
log.exception("Exception occurred")

Constructor Parameters

  • log_to_file (bool): Save logs to file (default False).
  • log_filename (str): Filename for log output (default "app.log").
  • print_to_console (bool): Print logs to the console (default True).
  • use_colors (bool): Use colorized output (default True).

License

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.1.0.tar.gz (4.0 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.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for logita-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7d05ef288eda70b45e71e3ae8fb61ec927da6498925bd5f851379ec480cc1718
MD5 1db2302ff4358972cd20341fa64b5016
BLAKE2b-256 d80529a4c6356f5b532db2f820bf59d59eb80d628f442e664c6dbb3df9db2d9f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: logita-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.2 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 538e451002e40acfecad5dca56a13b1eebdbdcd18205431ccda576b73947cf82
MD5 7c55bb341d84bb4b691e685a32909dbf
BLAKE2b-256 c77fca0f2bc849a5431fdfe84761380a03fd7dea3c08a9660ca1d2aca3f8cfe8

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