A simple logging package that helps you log colorized messages in Windows console.
Project description
log21
A simple logging package that helps you log colorized messages in Windows console and other operating systems.
Features
- Colors : The main reason for this package was to log text in the Windows console with the support of ANSI colors.
- Argument parsing : log21's argument parser can be used like python's argparse but it also colorizes the output.
- Logging : A similar logger to logging. Logger but with colorized output and other options such as levelname modifications. It can also decolorize the output if you want to log into a file.
- Pretty printing : Have you ever wanted to colorize the output of the pprint module? log21's pretty printer can do that.
- Tree printing : You can pass a dict or list to
log21.tree_print
function and it will print it in a tree-like structure. It's also colorized XD. - ProgressBar : log21's progress bar can be used to show progress of a process in a beautiful way.
- LoggingWindow : Helps you to log messages and debug your code in a window other than the console.
- CrashReporter : log21's crash reporter can be used to report crashes in different ways. You can use it to log crashes to console or files or use it to receive crash reports of your program through email. And you can also define your own crash reporter functions and use them instead!
- Argumentify : You can use the argumentify feature to decrease the number of lines you need to write to parse command-line arguments. It's colored by the way!
- Any idea? Feel free to open an issue or submit a pull request.
Installation
Well, this is a python package so the first thing you need is python.
If you don't have python installed, please visit Python.org and install the latest version of python.
Then you can install log21 using pip module:
python -m pip install log21 -U
Or you can clone the repository and run:
pip install .
Or let the pip get it using git:
pip install git+https://github.com/MPCodeWriter21/log21
Changes
2.10.0
- Added some exception classes to raise in the "argumentified" functions to show
parser error to the user:
ArgumentError
,IncompatibleArguments
,RequiredArgument
,TooFewArguments
Usage Examples:
See EXAMPLES.md
About
Author: CodeWriter21 (Mehrad Pooryoussof)
GitHub: MPCodeWriter21
Telegram Channel: @CodeWriter21
License
Donate
In order to support this project you can donate some crypto of your choice 8D
Or if you can't, give this project a star on GitHub :)
References
- ANSI Color Codes ( Wikipedia): https://en.wikipedia.org/wiki/ANSI_escape_code
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
File details
Details for the file log21-2.10.0.tar.gz
.
File metadata
- Download URL: log21-2.10.0.tar.gz
- Upload date:
- Size: 60.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44888dfdfef29ba1953c6f1f56591b558b726fe0550a7d7a2950821f405dc168 |
|
MD5 | 73c3879319eeea2d90fbaef59050ace2 |
|
BLAKE2b-256 | 419662e364c1331dde0a8f518b1ad29e61fc660d53b193c81876bd91d4ea6514 |
File details
Details for the file log21-2.10.0-py3-none-any.whl
.
File metadata
- Download URL: log21-2.10.0-py3-none-any.whl
- Upload date:
- Size: 64.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5efa213a9e74072aa10f81353db2e6c1d1203616fc82ec37322ef8dd1a53700 |
|
MD5 | f77a17115a66794d6bb2aed4f739a304 |
|
BLAKE2b-256 | 4a5b3cc8c4aa1c8cef537ace8265a50740aca348855dccd1c055603a2085b510 |