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

Uploaded Source

Built Distribution

lgg-0.3.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lgg-0.3.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for lgg-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8dcd25a5ba86c4855b46b6f5d507f9683f2cdef64509ab3a51255ca45e8aae43
MD5 ed5f9d404f4a8be97097676fc51e0371
BLAKE2b-256 7b8e264d0ff45ddcada5ca3d3111eaf8003344ccfd7e654ed4dd6a3b962b39eb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lgg-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for lgg-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67f4c9b231e9ee801ab50d65db3169a3caf7443fadfd9b5e3c6a9ad6c5ef35e8
MD5 b3f8c2b1adf5d7b9a4910f3338f28db6
BLAKE2b-256 c8dc739f011bf3976bf8503319edd564fc130a8d62ebcfae078957607d723678

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