Lightweight terminal logger with timestamps and optional caller inspection.
Project description
TinyLoggy - Lightweight Python Logging Utility
TinyLoggy is a minimal yet powerful logging utility designed for Python applications requiring simple, colorful terminal output with optional timestamping and caller inspection capabilities.
Features
- Colorful Terminal Output: Visually distinct log levels with ANSI color coding
- Timestamp Support: Optional automatic timestamping for each log entry
- Caller Inspection: Optional source code location tracking (file, line number, function)
- Lightweight: Minimal dependencies (only requires
colorama) - Configurable: Enable/disable logging globally or customize display options
- Cross-Platform: Works on Windows, Linux, and macOS
Installation
Install TinyLoggy using pip:
pip install tinnyloggy
Quick Start
from tinnyloggy import Logger
# Basic usage
log = Logger(time_stamp=True, enabled=True, inspect_mode=False)
log.info("System initialized successfully")
log.warning("Disk space below recommended threshold")
log.error("Failed to connect to database")
# Advanced usage with caller inspection
debug_log = Logger(inspect_mode=True)
debug_log.info("Entering calculation function")
Log Levels
TinyLoggy supports four standard log levels with distinctive colors:
-
info(): Blue background - General information -
warning(): Yellow background - Potential issues -
error(): Red background - Recoverable errors -
critical(): Magenta background - Critical failures
Command Line Integration
When used as a main module, TinyLoggy supports command line arguments:
python -m tinnyloggy --uselogs --inspect
-
--uselogs: Enables logging output -
--inspect: Enables caller inspection mode
Dependencies
-
Python 3.6+
-
colorama(automatic installation)
License
TinyLoggy is released under the MIT License. See LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 tinnyloggy-0.1.1.tar.gz.
File metadata
- Download URL: tinnyloggy-0.1.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cda4d58c6c242a325cec1446b585c153fe04751e4f0e8c74c31472fda7d3753
|
|
| MD5 |
21d769be4755c6d94a9c2d3d1f7185ca
|
|
| BLAKE2b-256 |
67e33941cf1a60a06f732d382c9e8a6417ed9ac1cc74de2894115f1c5dc7b568
|
File details
Details for the file tinnyloggy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tinnyloggy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13c853bbc2e335b0598985fa547f1d8e92872da8edbbf99d9acc37e89a8e6a07
|
|
| MD5 |
514d2909874c6b99bed58815fc563cf6
|
|
| BLAKE2b-256 |
f401b3d770d49618527141f761b4d59f4305c94b426a0f0fb9286b59b13031db
|