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, andexception. - 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 (defaultFalse).log_filename(str): Filename for log output (default"app.log").print_to_console(bool): Print logs to the console (defaultTrue).use_colors(bool): Use colorized output (defaultTrue).
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d05ef288eda70b45e71e3ae8fb61ec927da6498925bd5f851379ec480cc1718
|
|
| MD5 |
1db2302ff4358972cd20341fa64b5016
|
|
| BLAKE2b-256 |
d80529a4c6356f5b532db2f820bf59d59eb80d628f442e664c6dbb3df9db2d9f
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
538e451002e40acfecad5dca56a13b1eebdbdcd18205431ccda576b73947cf82
|
|
| MD5 |
7c55bb341d84bb4b691e685a32909dbf
|
|
| BLAKE2b-256 |
c77fca0f2bc849a5431fdfe84761380a03fd7dea3c08a9660ca1d2aca3f8cfe8
|