Skip to main content

R2Log - Ready To Log

PyPI Python Twitter

Custom overload of the python logger to integrate additional levels (verbose, advanced, success) by integrating Rich for advanced rendering (color, emoji, etc.).

Easy to deploy in a project and to use, ready to go.

Installation

Add R2Log to your requirements.txt file and pip3 install R2Log on your dev env.

How to use

Initialization

from R2Log import logger

logger.setVerbosity(0)  # Default INFO level 
logger.setVerbosity(1)  # Set VERBOSE level 
logger.setVerbosity(2)  # Set ADVANCED level 
logger.setVerbosity(3)  # Set DEBUG level 

logger.setVerbosity(quiet=True)  # Set CRITICAL level 

Log messages by level

from R2Log import logger

logger.setVerbosity(3)

logger.debug("Debug")
logger.advanced("Advanced")
logger.verbose("Verbose")
logger.info("Info")
logger.success("Success")
logger.warning("Warning")
logger.error("Error")
logger.critical("Critical")

Demo log levels

Nice to have

from R2Log import logger, R2Log

logger.setVerbosity(1)
logger.raw("""Raw text or byte 
or complex string with special char""")
logger.empty_line()
logger.empty_line()
logger.raw(level=R2Log.DEBUG, msg="""Debug but 
with a custom level""")
logger.raw(level=R2Log.INFO, msg="""Other INFO raw message but 
with a custom level""")

Demo Raw logs

Argparse argument and level init

import argparse, sys
from R2Log import logger

parser = argparse.ArgumentParser()
parser.add_argument("-v", "--verbose",
                    action="count",
                    default=0,
                    help="Verbosity level (-v for verbose, -vv for advanced, -vvv for debug)")
if len(sys.argv) == 1:
    parser.print_help()
    sys.exit(1)

args = parser.parse_args()
logger.setVerbosity(args.verbose)

Metadata

Release files for R2Log 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for R2Log 1.0.2
File Size Uploaded Provenance Actions
r2log-1.0.2.tar.gz 41.0 kB Without provenance Details for r2log-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for R2Log 1.0.2
File Interpreter ABI Platform Actions
R2Log-1.0.2-py3-none-any.whl Python 3 none any Details for R2Log-1.0.2-py3-none-any.whl

Total release size: 69.6 kB

Release files / r2log-1.0.2.tar.gz

Download URL r2log-1.0.2.tar.gz
Size 41.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9b19c032df840bab91b5cae2fb20cda22b15dd82e00bf1b82d78a0d0832ffbb3
BLAKE2b-256 checksum
How to use checksums
e415c23debefe8ba0cce73391b8045dafd5a1ac5913a3f8ad797da27477dba9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / R2Log-1.0.2-py3-none-any.whl

Download URL R2Log-1.0.2-py3-none-any.whl
Size 28.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4954c1ee6fc95c3bb0246a40595d9016032c7815cc43b77c909d15e7d0244b76
BLAKE2b-256 checksum
How to use checksums
33a5631bc4b044d909b71355807f64819c6d16eac7ec6a6b6413ba85f02f5960
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Security for R2Log 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page