https://github.com/jayvdb/frustum
https://github.com/jayvdb/frustum
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/jayvdb/frustum
- Owner: jayvdb
- License: mit
- Created: 2019-08-02T10:23:52.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-02T10:25:17.000Z (about 7 years ago)
- Last Synced: 2025-02-10T12:42:58.848Z (over 1 year ago)
- Language: Python
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Frustum
========
(Almost) out-of-the box logging. Frustum is a wrapper around the standard's
library logging, so you don't have to write the same boilerplate again.
Install::
pip install frustum
Usage::
from frustum import Frustum
# Initialize with logger name and level
frustum = Frustum('logger_name', 'debug')
# Register all the events that you want within frustum
frustum.register_event('setup', 'info', 'Frustum has been setup in {}')
# Start the logger
frustum.start_logger()
# Now you can use the registered events in this way
frustum.log('setup', 'readme')
# The previous call would output:
# INFO:app:Frustum has been setup in readme
# into your stdout (as per standard logging configuration)