A logger with text formatting using termcolor.
Project description
Termcolor Logger
About
A logger with text formatting using termcolor. PYPI Package
Table of Contents
Using the library
Installing and using the library
First, you need to install the library either using pip:
$ pip install termcolor_logger
Then, import it and use it like so:
from termcolor_logger import ColorLogger
fancy_logger = ColorLogger(logger_name='FancyMain',
color='blue',
on_color='on_red',
attrs=['underline', 'reverse', 'bold'])
ColorLogger.setup_logger(log_path="hi.log", debug=True, clear_log=True)
fancy_logger.info("You can customize the logger like this")
fancy_logger.info("You can customize each log message differently",
color="green", on_color="on_white", attrs=[])
Manually install the library
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Prerequisites
You need to have a machine with anaconda installed and any Bash based shell (e.g. zsh) installed.
$ conda -V
conda 4.10.1
$ echo $SHELL
/usr/bin/zsh
Install the requirements
All the installation steps are being handled by
the Makefile. First,
create a file called ~/.pypirc
with your pypi login details, as follows:
[pypi]
username = your_pypi_username
password = your_pypi_password
Then, modify the python version and everything else you need in the settings.ini.
Finally, execute the following commands:
$ make create_env
$ conda activate termcolor_logger
$ make release
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Hashes for termcolor_logger-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5cc84265033b2afbbf0bc67fbf0944bff881a3041aba9de84c6e7ef2e84fa2c |
|
MD5 | 595e0116b509062e98f765e5fa208c8e |
|
BLAKE2b-256 | 03df3172de60d979897ed9ec83b2613d0b09796520b6d15f4b28bb88322a11d9 |