#NEWLINE# def configure( app , admin = None ) : #NEWLINE# #INDENT# if app . config . get ( 'DEBUG_TOOLBAR_ENABLED' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# from flask_debugtoolbar import DebugToolbarExtension #NEWLINE# DebugToolbarExtension ( app ) #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# app . logger . info ( 'flask_debugtoolbar is not installed' ) #NEWLINE# #UNINDENT# #UNINDENT# if app . config . get ( 'OPBEAT' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# from opbeat.contrib.flask import Opbeat #NEWLINE# Opbeat ( admin , logging = app . config . get ( 'OPBEAT' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) . get ( 'LOGGING' , False ) ) #NEWLINE# app . logger . info ( 'opbeat configured!!!' ) #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# app . logger . info ( 'opbeat is not installed' ) #NEWLINE# #UNINDENT# #UNINDENT# if app . config . get ( 'SENTRY_ENABLED' , False ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# from raven.contrib.flask import Sentry #NEWLINE# app . sentry = Sentry ( app ) #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# app . logger . info ( 'sentry, raven is not installed' )