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

Latest commit

 

History

History
36 lines (26 loc) · 824 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 824 Bytes

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