Skip to main content

Adds PaperTrail logging to your Flask application

Project description

flask_papertrail

flask_papertrail – Easily setup papertrail to your Flask application

https://travis-ci.org/cuonglm/flask-papertrail.svg?branch=master

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

Author

Cuong Manh Le cuong.manhle.vn@gmail.com

License

See LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Flask-PaperTrail, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size Flask-PaperTrail-0.0.3.tar.gz (2.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page