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

Uploaded Source

Built Distribution

lgg-0.2.4-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

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