Skip to main content

A library designed to make logging easy.

Project description

Tyclonie Logger

Version: 1.0
GitHub
pip install TyclonieLogger

Documentation

Requirements

These should automatically install during the install of Tyclonie Logger
Colorama (0.4.6) - pip install colorama==0.4.6

Classes

TyclonieLogger()

  • Arguments: **options (Full list of options are listed after the code examples along side its default value)
  • The TyclonieLogger class is what contains the functions and procedures required to log using the program, the functions and methods will be called from an instance of the TyclonieLogger class

Functions

log()

  • Arguments: message
  • Returns: Void (N/A)
  • Logs the message that you pass into the console

warn()

  • Arguments: message
  • Returns: Void (N/A)
  • Logs the message that you pass into the console as a warning, made to alert the user of the program

error()

  • Arguments: message
  • Returns: Void (N/A)
  • Logs the message that you pass into the console as an error, made to alert the user of the program that someone bad has happened and it has been handled

get_datetime_formatted()

  • Arguments: None
  • Returns: String
  • Gets the current date and time formatted in the format provided when its TyclonieLogger instance was created. The use of this is for testing the format you provided.

Examples

Note: You may decide to use exact imports, using "from tyclonielogger import TyclonieLogger" instead of using "import tyclonielogger", simply then just replace everywhere that says "tyclonielogger.TyclonieLogger" with "TyclonieLogger", and it will have the same effect

Using inheritance (Object Orientated Programming):

Using sequencing:

Example output:

TyclonieLogger() Options

Notes

  • For selectable forground colours output show_foreground_colours on a TyclonieLogger instance
  • For selectable background colours output show_background_colours on a TyclonieLogger instance
  • For selectable styles output show_styles on a TyclonieLogger instance
  • They're layed out such that option=DEFAULT_VALUE
  • After outputtind the selectable styles, if its hard to see text you can highlight it in the terminal to make it easier to see

Options

datetime_format="%Y/%m/%d @ %H:%M:%S"
datetime_text_divider=" | "
datetime_background="YELLOW"
datetime_foreground="BLACK"
datetime_style="NORMAL"
log_identifier_foreground="GREEN"
log_identifier_background="NORMAL"
log_identifier_style="NORMAL"
log_message_foreground="NORMAL"
log_message_background="NORMAL"
log_message_style="NORMAL"
log_identifier_message_divider=": "
log_dividers_foreground="NORMAL"
log_dividers_background="NORMAL"
log_dividers_style="NORMAL"
warn_identifier_foreground="RED"
warn_identifier_background="NORMAL"
warn_identifier_style="BRIGHT"
warn_message_foreground="NORMAL"
warn_message_background="NORMAL"
warn_message_style="NORMAL"
warn_identifier_message_divider=": "
warn_dividers_foreground="NORMAL"
warn_dividers_background="NORMAL"
warn_dividers_style="NORMAL"
error_identifier_foreground="BLACK"
error_identifier_background="RED"
error_identifier_style="BRIGHT"
error_message_foreground="RED"
error_message_background="NORMAL"
error_message_style="NORMAL"
error_identifier_message_divider=": "
error_dividers_foreground="NORMAL"
error_dividers_background="NORMAL"
error_divider_style="NORMAL"

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

TyclonieLogger-2.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file TyclonieLogger-2.0-py3-none-any.whl.

File metadata

  • Download URL: TyclonieLogger-2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for TyclonieLogger-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7d42d6822454810d059b36290e552aa223062398fae0c664ffeb5b854906c23
MD5 a95c1a5e746ef5f251659dfa84563113
BLAKE2b-256 5eeccc16ad08c7f60696915206fa9dc5f0356847de480c7871c6677134faa4b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page