Skip to main content

A simple, styled logging library.

Project description

StyledLogger

A simple - yet beautiful logging library for Python 🐍 > 3.7

To use, simply do pip install styledlogger

Then you can import StyledLogger from the package and initialize it.

Simple example using a logger:

>>> from styledlogger import StyledLogger

>>> logger = StyledLogger(name="Main") # Initialize a logger named "Main"
>>> logger.set_level(0) # Enable debug - default level is 1, which means every log type except debug

>>> logger.debug("This is just a test print")
9:55:30 :: DEBU @ Main - This is just a test print

>>> logger.error("Could not fetch url 'https://example.com'")
10:15:14 :: ERRO @ Main - Could not fetch url 'https://example.com'

>>> from styledlogger import StyleConfig
>>> logger.set_style(StyleConfig( text_format="(%time%) | %type% - %msg%", time_format='DD/MM/YYYY hh:mm' )) # Change the text format and time format in the logs. Placeholders you can use are: %name%, %time%, %type% and %msg%.
>>> logger.warn("CPU usage exceeding 90%")
(22/04/2023 10:01) | WARN - CPU usage exceeding 90%

Check out the GitHub: https://github.com/SpLayzDK/StyledLogger Contact me at mail: alek@imalek.me

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

styledlogger-0.0.4.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

styledlogger-0.0.4-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file styledlogger-0.0.4.tar.gz.

File metadata

  • Download URL: styledlogger-0.0.4.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for styledlogger-0.0.4.tar.gz
Algorithm Hash digest
SHA256 dd40b254365cd3ece1b3f55063ecc5aa2af4f87285d0b06f0bbbbab10829d600
MD5 4e49adc8a8fdc2de8f500c5daf74597f
BLAKE2b-256 114a48f2c7e878f86d0b6478acf01534909b0e6250de02307ab182636bb37bee

See more details on using hashes here.

File details

Details for the file styledlogger-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: styledlogger-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for styledlogger-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d19479999b0b434149c74ccf35f516d4a9013e0c392985fb9a14b954727319f0
MD5 a1595b6fa14bb366119c2cfc219e1ec9
BLAKE2b-256 912417f91729451f48045d1a69b7b8dd27bbdc6d9256be16f9ac3e9d491739bd

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