Skip to main content

ytlog - log module for humans.

Project description

ytlog - log module for humans
============================

We use logging everyday, bug it's easy to forget how to use buildin
logging module of Python, because the configuration looks complicated.

So I copy log.py module from [Tornado(github)](https://github.com/facebook/tornado)


pip install ytlog


How to use
----------

from ytlog import get_logger

log = get_logger({"name": "app"})
log.info("Mission starts.")


Then we will see logging in console and log file under directory /data/logs/

![screenshot](./screenshot.png)

So easy!


If you want to change log file path, just add arg "dir"

e.g.

log = get_logger({"name": "app", "dir": "./"})

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

ytlog-0.6.tar.gz (4.7 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page