Skip to main content

print_helper_logger

print_helper_logger provides a Print_Helper class for printing messages to the console and the system logger, with options for using timestamps, colored messages, and different severity levels.

Features

  • Print messages with different severity levels: CRITICAL, ERROR, WARNING, INFO, DEBUG.
  • Options to include timestamps in messages.
  • Colored messages for better visual clarity.
  • Log messages to a log file.
  • print` function that automatically determines the severity level of the message based on tags included in the message text: , , , and .

Installation

You can install the package using pip once it's published on PyPI: git

pip install print_helper_logger

Usage

from print_helper_logger import Print_Helper, Severity_Level

# Create an instance of Print_Helper
ph = Print_Helper(
    severity_level=Severity_Level.INFO, 
    show_color=True, 
    show_timestamp=True, 
    show_logger=True, 
    filename_logger="log.txt"
)

# Print messages with different severity levels
ph.print_crt("This is a critical message")
ph.print_err("This is an error message")
ph.print_wrn("This is a warning message")
ph.print_inf("This is an informational message")
ph.print_dbg("This is a debug message")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

print_helper_logger-0.0.5.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

print_helper_logger-0.0.5-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 files

0.0.4

2 files

0.0.2

2 files

0.0.1

2 files

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