Skip to main content

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!")
image-20230529154733777

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)
image-20230529155434474

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


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.0.7.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

echo_logger-0.0.7-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page