Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

AirHelp/flask-rage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEPRECATED

This is no longer supported since 2021-11-10

Repository will be archived on 2021-12-10

Flask RAGE

Build Status

Flask extension allowing to mimic Ruby on Rails' lograge gem behavior

Application setup

Enable logger for the application

from flask import Flask
from flask_rage import FlaskRage

app = Flask(__name__)

rage = FlaskRage()
rage.init_app(app)

Logging config

To avoid multiple entries you may want to disable (e.g. send to logging.NullHandler) messages from werkzeug or gunicorn

[handler_stream]
class=logging.StreamHandler
formatter=flask_rage
args=()

[formatter_flask_rage]
class=flask_rage.FlaskRageFormatter

About

An attempt to mimic lograge in Flask apps

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

Languages