Skip to main content

Bring visual effect to your logging message.

Project description

Documentation Status https://github.com/MacHu-GWU/vislog-project/actions/workflows/main.yml/badge.svg https://codecov.io/gh/MacHu-GWU/vislog-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/vislog.svg https://img.shields.io/pypi/l/vislog.svg https://img.shields.io/pypi/pyversions/vislog.svg https://img.shields.io/badge/Release_History!--None.svg?style=social https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
https://img.shields.io/badge/Link-Document-blue.svg https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to vislog Documentation

https://vislog.readthedocs.io/en/latest/_static/vislog-logo.png

vislog is a ZERO-dependency logging library that brings visual effect to your logging message. It allows you to use any logging library you like, and just add visual effect.

@logger.emoji_block(msg="build", emoji="🏭")
def run_build():
    time.sleep(1)
    logger.info("run build")

@logger.emoji_block(msg="test", emoji="🧪")
def run_test():
    time.sleep(1)
    logger.info("run test")
    with logger.nested():
        run_build()

@logger.emoji_block(msg="deploy", emoji="🚀")
def run_deploy():
    time.sleep(1)
    logger.info("run deploy")
    with logger.nested():
        run_test()

run_deploy()

Will show:

[User 2024-06-16 15:06:44] +----- 🕑 🚀 Start 'deploy' -----------------------------------------------------+
[User 2024-06-16 15:06:44] 🚀
[User 2024-06-16 15:06:45] 🚀 run deploy
[User 2024-06-16 15:06:45] 🚀 +----- 🕑 🧪 Start 'test' -----------------------------------------------------+
[User 2024-06-16 15:06:45] 🚀 🧪
[User 2024-06-16 15:06:46] 🚀 🧪 run test
[User 2024-06-16 15:06:46] 🚀 🧪 +----- 🕑 🏭 Start 'build' --------------------------------------------------+
[User 2024-06-16 15:06:46] 🚀 🧪 🏭
[User 2024-06-16 15:06:47] 🚀 🧪 🏭 run build
[User 2024-06-16 15:06:47] 🚀 🧪 🏭
[User 2024-06-16 15:06:47] 🚀 🧪 +----- ⏰ ✅ 🏭 End 'build', elapsed = 1.01 sec ------------------------------+
[User 2024-06-16 15:06:47] 🚀 🧪
[User 2024-06-16 15:06:47] 🚀 +----- ⏰ ✅ 🧪 End 'test', elapsed = 2.02 sec ---------------------------------+
[User 2024-06-16 15:06:47] 🚀
[User 2024-06-16 15:06:47] +----- ⏰ ✅ 🚀 End 'deploy', elapsed = 3.03 sec ---------------------------------+

Install

vislog is released on PyPI, so all you need is to:

$ pip install vislog

To upgrade to latest version:

$ pip install --upgrade vislog

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

vislog-0.1.2.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

vislog-0.1.2-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file vislog-0.1.2.tar.gz.

File metadata

  • Download URL: vislog-0.1.2.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.10

File hashes

Hashes for vislog-0.1.2.tar.gz
Algorithm Hash digest
SHA256 25a2f1f4285a9cfb113a5e55401845d3562f949492bec329daeb23d7b144bb70
MD5 b54a2b0695a32868db6d0ce5ff1632b3
BLAKE2b-256 54757c41faeafb961873c16284140cfd27f0cc00581a85c7cf8abe41d75f9490

See more details on using hashes here.

File details

Details for the file vislog-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: vislog-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.10

File hashes

Hashes for vislog-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 21311339dda1e7ba7164a7e2ee0c3806a2578e9ded94b93cf6cb13bc19c405a0
MD5 3c4c8fbdd64f6e7b21f7f6def46c12e3
BLAKE2b-256 6c3d0af2747f3549dca069021cd722770d8dcac5b2a25417652566fe540fc343

See more details on using hashes here.

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