https://github.com/onstash/lumberjack
Lumberjack - Python Logging for Humans™
https://github.com/onstash/lumberjack
logger logging python
Last synced: 4 months ago
JSON representation
Lumberjack - Python Logging for Humans™
- Host: GitHub
- URL: https://github.com/onstash/lumberjack
- Owner: onstash
- License: mit
- Created: 2017-02-23T20:29:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-24T06:16:54.000Z (over 9 years ago)
- Last Synced: 2026-01-14T11:38:50.660Z (6 months ago)
- Topics: logger, logging, python
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
# 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_.log'
logger = Lumberjack(name="lumberjack", file_name="logs/lumberjack.log")
logger.info('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.