Skip to main content

Python Logging for Humans

Project description

# Lumberjack - Python Logging for Humans™

## What is this?

This project is about creating a custom logger with a few arguments such as logger name and file path (if FileHandler is used).

## Why was this made?

In the python projects I have worked with (work or personal projects), I have always had to create a logging instance with a FileHandler, provide a logging format, provide logging file name (and create directories if need be), which is extremely frustrating, at the least. So I decided to encapsulate the pain points regarding the aforementioned.

## How do I use this?

from lumberjack import Lumberjack

# outputs logs in the console.
logger = Lumberjack(name="lumberjack")

# outputs logs in the filename 'logs/lumberjack_<timestamp>.log'
logger = Lumberjack(name="lumberjack", file_name="logs/lumberjack.log")'Live long and prosper, hoomans')

# Log output
2017-02-23 20:31:41,932 - lumberjack - INFO - Live long and prosper, hoomans!

## Can I contribute to this?

Sure! Create an issue in the repo if it's not already present. Then fork this repo, branch off from `master`, add a feature / push a fix and raise a pull-request. I'll merge it once I deem it useful.

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

pylumberjack-0.0.1.tar.gz (2.9 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