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.1.6.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

echo_logger-0.1.6-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file echo_logger-0.1.6.tar.gz.

File metadata

  • Download URL: echo_logger-0.1.6.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for echo_logger-0.1.6.tar.gz
Algorithm Hash digest
SHA256 021c42a12b8af50e629838fa3dac160be22999d4cbcdc9a74fd4bdd3b01288d1
MD5 846e3e7fd569c1fd31ebef1f61f1c5a1
BLAKE2b-256 551d5f0af4eb32c7f9e544ae5dd1fcbf0a700a89dbf8b35dea3e7dc4aa7be5fd

See more details on using hashes here.

File details

Details for the file echo_logger-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: echo_logger-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for echo_logger-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 96c0e2fdd218e1eeb3f9a2310e19bb29e47764e1a9ebcec1517173a9baad6ec5
MD5 47751229a30e1d454b20c3343f45c1bc
BLAKE2b-256 f243a842eee6044cb4505344aa697833aa959412958a1c63bafd270861f2087b

See more details on using hashes here.

Supported by

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