A simple logger for python, with color and time
Project description
Echo Logger
pip repo is here.
This is a simple echo logger for informative, warning and error messages.
Time and colored printing are supported.
This repository is mostly for my own use, but feel free to use it if you want.
Usage
# build (before you do this, don't forget to change the version id in setup.py)
python setup.py sdist bdist_wheel
# upload (before you do this, please rmv the outdated files of previous versions in dist/)
twine upload dist/*
# install
pip install echo-logger
# upgrade
pip install echo-logger --upgrade
Demo
Simple usage:
print_info("Hello World!")
print_warn("Hello World!")
print_err("Hello World!")
If you want to print with time:
print_info("Hello World!", with_time=True)
print_warn("Hello World!", with_time=True)
print_err("Hello World!", with_time=True)
If you want nothing to be printed (Let's say, you finished unit testing and want to run the whole program without any logger output):
echo_logger.echo_logger_debug = False # disable any logger functions from echo_logger
print_info("Hello World!")
print_warn("Hello World!")
print_err("Hello World!")
# No output at all.
Just so simple and straightforward.
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
echo_logger-0.1.0.tar.gz
(6.5 kB
view hashes)
Built Distribution
Close
Hashes for echo_logger-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97935953516e6003e78f3ba561062e473f5196948d1a860feadb7f05cb9a9dda |
|
MD5 | 6f9ba42f56fd3337ee44ce4e0f61089e |
|
BLAKE2b-256 | b230a5cccc19a2e439e3fa0d1cf687e79ea85e59e6996a6a4b4478fd1f8fc6f7 |