Skip to main content

A simple yet fancy logger for Python scripts

Project description

python-logger

A simple yet fancy logger for Python scripts

Install

  • Using pip:
pip install lgg
  • Using Poetry:
poetry add lgg

Usage

# This way
from lgg import logger
# Or
from lgg import get_logger
logger = get_logger()
# End Or

logger.info('This is an info message')

logger.debug('Debugging message')

logger.error('error message')

logger.warning('File not found! An empty one is created')

Result

from lgg import get_logger
logger = get_logger('python-logger')

logger.info('This is an info message')

logger.debug('Debugging message')

logger.error('error message')

logger.warning('File not found! An empty one is created')

Result

Notice the change after each log's datetime, the former shows the filename and line of code, the latter displays the logger name instead

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

lgg-0.4.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

lgg-0.4.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file lgg-0.4.0.tar.gz.

File metadata

  • Download URL: lgg-0.4.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-1020-azure

File hashes

Hashes for lgg-0.4.0.tar.gz
Algorithm Hash digest
SHA256 48a6e6ec456da6abb4aa874fb570b74adefa34f6d5d77a26cf6056deb45646e2
MD5 d132f0020fbcfac8d84f776913a02ea4
BLAKE2b-256 66d57987cc7bea2937ef596fc03607e6c0a06686ea854d418f28f429d5187df9

See more details on using hashes here.

File details

Details for the file lgg-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: lgg-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-1020-azure

File hashes

Hashes for lgg-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bb51063e7097d3f2a5103364a49718a94fdbbdbba96507468fad142533f0f9e
MD5 9a7a04e59822d9312096a19b225a387f
BLAKE2b-256 516bf51cc2796078833a13ab85dd8ea77acb60b1cf710ed38139752e14378d84

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