Skip to content

module utils.loggerSingleton


class LoggerSingleton

Simple class used to display messages on CLI. Using as a singleton so it will share the log_level everywhere

Args:

  • metaclass (type, optional): description. Defaults to Singleton.

method __init__

__init__(log_level: int = 20) → None

method critical

critical(message: str, stripped: bool = False) → None

Public method used to display critical message (Default: red and starting with '[!!] ')

Args:

  • message (str): the critical message to output
  • stripped (bool, optional): strip the starting pattern '[!!] '. Defaults to False.

method debug

debug(message: str, stripped: bool = False) → None

Public method used to display debug message (Default: cyan and starting with '[*] ')

Args:

  • message (str): the debug message to output
  • stripped (bool, optional): strip the starting pattern '[*] '. Defaults to False.

method error

error(message: str, stripped: bool = False) → None

Public method used to display error message (Default: red and starting with '[!] ')

Args:

  • message (str): the error message to output
  • stripped (bool, optional): strip the starting pattern '[!] '. Defaults to False.

method info

info(message: str, stripped: bool = False) → None

Public method used to display info message (Default: green and starting with '[+] ')

Args:

  • message (str): the info message to output
  • stripped (bool, optional): strip the starting pattern '[+] '. Defaults to False.

method isDebug

isDebug() → bool

Public method used to detect debug conditions

Returns:

  • bool: debug state

method output

output(message: str) → None

Public method used to display raw message without conditions or color

Args:

  • message (str): mesasge to display

method warning

warning(message: str, stripped: bool = False) → None

Public method used to display warning message (Default: yellow and starting with '[!] ')

Args:

  • message (str): the warning message to output
  • stripped (bool, optional): strip the starting pattern '[!] '. Defaults to False.

This file was automatically generated via lazydocs.