Adds PaperTrail logging to your Flask application
Project description
flask_papertrail
flask_papertrail – Easily setup papertrail to your Flask application
Installation
pip install Flask-PaperTrail
Usage
from flask import Flask
from flask_papertrail import PaperTrail
app = Flask(__name__)
Papertrail(app)
Or using init_app:
from flask import Flask
from flask_papertrail import PaperTrail
app = Flask(__name__)
p = PaperTrail()
p.init_app(app)
Config
Required:
app.config['PAPERTRAIL_HOST'] = 'your papertrail host setup'
app.config['PAPERTRAIL_PORT'] = 'your papertrail port setup'
Optional:
app.config['PAPERTRAIL_APP'] = str(app) # Your papertrail app name
app.config['PAPERTRAIL_LOGFORMAT'] = '%(asctime)s %(hostname)s {0}: %(levelname)s %(message)s'.format(str(app)) # Log format
License
See LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file Flask-PaperTrail-0.0.3.tar.gz
.
File metadata
- Download URL: Flask-PaperTrail-0.0.3.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bed4f618519aa9261cdee6958a4d8baeccebcbfe5bfa34edefe0c864b4e8557e |
|
MD5 | a746447f4cca30ec1c510a6fb323379d |
|
BLAKE2b-256 | 5d414cf03ad29912a5a802ff29639d0a7f186004c021144ce57299620248ec3d |