Skip to content
This repository has been archived by the owner on Jul 31, 2021. It is now read-only.
/ flask-papertrail Public archive

Easily setup papertrail to your Flask application

License

Notifications You must be signed in to change notification settings

cuonglm/flask-papertrail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Easily setup papertrail to your Flask application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages