Skip to main content

A great colored logger!

Project description

BetterLogger

The best option for customizable and simplicity!

Config

All parts of the logger can be configured via environment variables.

Required

  • "APPNAME" - defaults to "BetterLogger"
  • "APPAUTHOR" - defaults to "BetterLogger"
  • "APPVERSION" - defaults to "1.0"
  • "SHORT_APPNAME" - defaults to "BL"

Logging Stuff

  • "LOG_LEVEL" - defaults to 10
  • "LOG_FORMAT" - defaults to "%LEVEL_COLOR[%BOLD{level: <10}]%RESET %LEVEL_COLOR[%BOLD{class_name: <32}]%RESET %LEVEL_COLOR {message}%RESET"
  • "DISABLE_WELCOME_LOGGING" -
    • BetterLogger sends some welcome text to introduce the program and to test the logger welcome logging example
    • defaults to False
  • "LOG_WHITELIST_ON" -
    • Turns on the log whitelist
    • Defaults to False
  • "LOG_WHITELIST" -
    • Choose which log names to be allowed through
    • Defaults to []
  • "LOG_BLACKLIST" -
    • Choose which log names to be filtered out
    • Overrules values in "LOG_WHITELIST"
    • Defaults to []
  • "LOG_NAMES_TO_SHORTEN" -
    • An array where the key is the item that needs shortening and the value is the shortened value
    • Defaults to {}

Saving Logs

  • "LOG_SAVE_DIR" - defaults to appdirs.user_log_dir(appname=appname, appauthor=appauthor, version=appversion)
  • "LOG_FILE_NAME_FORMAT" - defaults to "{appname}_{year}-{day}-{hour}-{minute}_{number}.log"

Colors

BetterLogger comes with 9 colors, and 2 other text modifiers. There is black, red, green, yellow, blue, magenta, cyan, white, bold and reset. These can be accessed in logging by using the % sign and then writing the color name in all caps and then using the reset code, e.g. e.g. %REDHelloWorld%Reset

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

betterLogger-1.6.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

betterLogger-1.6-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file betterLogger-1.6.tar.gz.

File metadata

  • Download URL: betterLogger-1.6.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for betterLogger-1.6.tar.gz
Algorithm Hash digest
SHA256 3740eb518e6390a10c55baaba86b1aaa880beb0eed81bdcd1fb828351076f64d
MD5 e2a75fe306c8d36dab617f4f8bd70f33
BLAKE2b-256 ec6d7084ecf0a5b66d03f268316a77fd0647e0fdcf6a96fc6fe7b5819dbabae6

See more details on using hashes here.

File details

Details for the file betterLogger-1.6-py3-none-any.whl.

File metadata

  • Download URL: betterLogger-1.6-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for betterLogger-1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e890f912551e08eaed56013aaf114f358f43341bee269d531492f0afebe863a8
MD5 b52191e48ddc4dd7ef214d934a594ea8
BLAKE2b-256 25b5929d1858c70d1663c8c96f6e64a3a434aa2e8a85d758a4b1ba6fd86ed56d

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