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"

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"
  • "DISABLE_WELCOME_LOGGING" -
    • BetterLogger sends some welcome text to introduce the program and to test the logger welcome logging example
    • defaults to False

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.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

betterLogger-1.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: betterLogger-1.1.tar.gz
  • Upload date:
  • Size: 5.6 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.1.tar.gz
Algorithm Hash digest
SHA256 7092308999ebde1a4eb76e5c1540d01ef40831cde0a45d311d24fe5cf48267f7
MD5 9c1a0a72089702a1c332becd9fbd1d84
BLAKE2b-256 f11b6737ffcf1c1bcf4e26e1961a37930ef5c7bad027ce8316a694d28385031b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: betterLogger-1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f42c6be7525e07af0712214fff4820a2bd39bde3e41e3e1c342b7b69ff44334
MD5 8fcd9338c2fb5458dc22723c47eb3604
BLAKE2b-256 712313bd56b62ae043c7e2a270c3ca7491aa2f56357a92c37fe38d053d024481

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