flask_papertrail -- Easily setup papertrail to your Flask application
pip install Flask-PaperTrail
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)
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
Cuong Manh Le cuong.manhle.vn@gmail.com
See LICENSE