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

Uploaded Source

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