Skip to main content

Vistor's Console Logger (VCLog) offers a minimal and colorful console logging. Single-script. No dependencies.

Project description

VCLog: Minimal and Simple Console Logging

pypi version MIT License docs

Vistor's Console Logger (VCLog) offers a minimal and colorful console logging. Single-script. No dependencies.

Features

As every logger in the world, there are four levels of logging: info, debug, warning, and error.

from vclog import Logger

Logger.info("info")
>> |I| info

Logger.debug("debug")
>> |D| debug

Logger.warning("warning")
>> |W| warning

Logger.error("error")
>> |E| error

It also has a plain method in which color, background color, and style can be specified.

Logger.plain("plain text with format", color="blue", bg_color="green", style="bold")

The logger can also be disabled by setting the disable attribute to True. This only works for the instantiated logger.

logger = Logger("instance", disable=True)
logger.info("this message will not be displayed")

The package also offers a format method to get the formatted string directly.

from vclog import format

message: str = format("Hello, World!", color="red")

The main feature of VCLog is that the Logger can be used as a static class or it can be instantiated. When instantiated, you can provide a name to be displayed.

Logger.info("as a static method")
>> |I| as a static method

logger = Logger("instance")
logger.info("as an instance")
>> |I| [instance] as an instance

Installation

Follow the next steps for installing the simulation on your device.

Requierements:

  • Python 3.10.0 or higher

Note: VCLog works on Linux, Windows and Mac.

Install from pip

VCLog is available as a pip package. For installing it just use:

pip install vclog

Install from source

You can either clone the repository

git clone https://github.com/vistormu/vclog.git

or just copy and paste the logger.py file.

Documentation

The official documentation of the package is available on Read the Docs. Here you will find the installation instructions, the API reference and some minimal working examples.

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

vclog-1.1.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

vclog-1.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file vclog-1.1.1.tar.gz.

File metadata

  • Download URL: vclog-1.1.1.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for vclog-1.1.1.tar.gz
Algorithm Hash digest
SHA256 f2d44ae893cdea29a6d442fd556ca5b8f51f161e18ea1fbbc9fad953c81fa596
MD5 a024f93c3c3baa531b242d0cb8055f6f
BLAKE2b-256 b00a91d26b9630319b34e22e084239fe60593a33246de925cc7eea20c1d62ecd

See more details on using hashes here.

File details

Details for the file vclog-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: vclog-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for vclog-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e27e59ec931358dcad3079c160a2a2adde0c1f6fd5d354534889511ebdb41893
MD5 65fe028948aa6e7204dbcaefa39b02df
BLAKE2b-256 898fb180363f2d52fb68d822bbcb6355fdbd98a7c02731a1c8cb1b63806050da

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