Metadata-Version: 2.4
Name: vislog
Version: 0.1.3
Summary: Bring visual effect to your logging message.
Author-email: Sanhe Hu <husanhe@email.com>
Maintainer-email: Sanhe Hu <husanhe@email.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/MacHu-GWU/vislog-project
Project-URL: Documentation, https://vislog.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/MacHu-GWU/vislog-project
Project-URL: Issues, https://github.com/MacHu-GWU/vislog-project/issues
Project-URL: Changelog, https://github.com/MacHu-GWU/vislog-project/blob/main/release-history.rst
Project-URL: Download, https://pypi.org/pypi/vislog#files
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: <4.0,>=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
License-File: AUTHORS.rst
Provides-Extra: dev
Requires-Dist: rich<14.0.0,>=13.8.1; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest<9.0.0,>=8.2.2; extra == "test"
Requires-Dist: pytest-cov<7.0.0,>=6.0.0; extra == "test"
Provides-Extra: doc
Requires-Dist: Sphinx<8.0.0,>=7.4.7; extra == "doc"
Requires-Dist: sphinx-copybutton<1.0.0,>=0.5.2; extra == "doc"
Requires-Dist: sphinx-design<1.0.0,>=0.6.1; extra == "doc"
Requires-Dist: sphinx-jinja<3.0.0,>=2.0.2; extra == "doc"
Requires-Dist: furo==2024.8.6; extra == "doc"
Requires-Dist: pygments<3.0.0,>=2.18.0; extra == "doc"
Requires-Dist: ipython<8.19.0,>=8.18.1; extra == "doc"
Requires-Dist: nbsphinx<1.0.0,>=0.8.12; extra == "doc"
Requires-Dist: rstobj==2.0.0; extra == "doc"
Requires-Dist: docfly==3.0.3; extra == "doc"
Provides-Extra: mise
Requires-Dist: PyGithub<3.0.0,>=2.8.0; extra == "mise"
Requires-Dist: httpx<1.0.0,>=0.28.0; extra == "mise"
Requires-Dist: tomli<3.0.0,>=2.0.0; python_version < "3.11" and extra == "mise"
Dynamic: license-file


.. image:: https://readthedocs.org/projects/vislog/badge/?version=latest
    :target: https://vislog.readthedocs.io/en/latest/
    :alt: Documentation Status

.. image:: https://github.com/MacHu-GWU/vislog-project/actions/workflows/main.yml/badge.svg
    :target: https://github.com/MacHu-GWU/vislog-project/actions?query=workflow:CI

.. image:: https://codecov.io/gh/MacHu-GWU/vislog-project/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/MacHu-GWU/vislog-project

.. image:: https://img.shields.io/pypi/v/vislog.svg
    :target: https://pypi.python.org/pypi/vislog

.. image:: https://img.shields.io/pypi/l/vislog.svg
    :target: https://pypi.python.org/pypi/vislog

.. image:: https://img.shields.io/pypi/pyversions/vislog.svg
    :target: https://pypi.python.org/pypi/vislog

.. image:: https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github
    :target: https://github.com/MacHu-GWU/vislog-project/blob/main/release-history.rst

.. image:: https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
    :target: https://github.com/MacHu-GWU/vislog-project

------

.. image:: https://img.shields.io/badge/Link-API-blue.svg
    :target: https://vislog.readthedocs.io/en/latest/py-modindex.html

.. image:: https://img.shields.io/badge/Link-Install-blue.svg
    :target: `install`_

.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
    :target: https://github.com/MacHu-GWU/vislog-project

.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
    :target: https://github.com/MacHu-GWU/vislog-project/issues

.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
    :target: https://github.com/MacHu-GWU/vislog-project/issues

.. image:: https://img.shields.io/badge/Link-Download-blue.svg
    :target: https://pypi.org/pypi/vislog#files


Welcome to ``vislog`` Documentation
==============================================================================
.. image:: https://vislog.readthedocs.io/en/latest/_static/vislog-logo.png
    :target: https://vislog.readthedocs.io/en/latest/

``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.

.. code-block:: python

    @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:

.. code-block::

    [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:

Install
------------------------------------------------------------------------------

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

.. code-block:: console

    $ pip install vislog

To upgrade to latest version:

.. code-block:: console

    $ pip install --upgrade vislog


AI Agent Skill
------------------------------------------------------------------------------

``vislog`` ships with a `Claude Code agent skill <https://github.com/MacHu-GWU/vislog-project/blob/main/.claude/skills/vislog/SKILL.md>`_ that teaches AI assistants how to use this library. Copy the ``.claude/skills/vislog/`` directory into your project's ``.claude/skills/`` (or ``~/.claude/skills/`` for global access), and the AI will know the full ``vislog`` API — no extra prompting needed.
