Bring visual effect to your logging message.
Project description
Welcome to vislog Documentation
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
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
vislog-0.1.2.tar.gz
(14.4 kB
view details)
Built Distribution
vislog-0.1.2-py3-none-any.whl
(12.6 kB
view details)
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25a2f1f4285a9cfb113a5e55401845d3562f949492bec329daeb23d7b144bb70 |
|
MD5 | b54a2b0695a32868db6d0ce5ff1632b3 |
|
BLAKE2b-256 | 54757c41faeafb961873c16284140cfd27f0cc00581a85c7cf8abe41d75f9490 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21311339dda1e7ba7164a7e2ee0c3806a2578e9ded94b93cf6cb13bc19c405a0 |
|
MD5 | 3c4c8fbdd64f6e7b21f7f6def46c12e3 |
|
BLAKE2b-256 | 6c3d0af2747f3549dca069021cd722770d8dcac5b2a25417652566fe540fc343 |