mirror of
https://gist.github.com/adc541a6245d55e39edd10dab1001a88.git
synced 2024-11-22 08:51:30 -08:00
add __init__.py
This commit is contained in:
parent
ab394e508c
commit
758a824184
25
__init__.py
Normal file
25
__init__.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# app/__init__.py
|
||||||
|
|
||||||
|
import logging
|
||||||
|
from flask import Flask
|
||||||
|
from config import Config
|
||||||
|
|
||||||
|
app = Flask(__name__)
|
||||||
|
app.config.from_object(Config)
|
||||||
|
|
||||||
|
from app.sendxmpp_handler import SENDXMPPHandler
|
||||||
|
from app import routes
|
||||||
|
|
||||||
|
|
||||||
|
if app.config['LOGGING_XMPP_SERVER']:
|
||||||
|
sendxmpp_handler = SENDXMPPHandler(
|
||||||
|
logging_xmpp_server=(app.config['LOGGING_XMPP_SERVER']),
|
||||||
|
logging_xmpp_sender=(app.config['LOGGING_XMPP_SENDER']),
|
||||||
|
logging_xmpp_password=(app.config['LOGGING_XMPP_PASSWORD']),
|
||||||
|
logging_xmpp_recipient=(app.config['LOGGING_XMPP_RECIPIENT']),
|
||||||
|
logging_xmpp_command=(app.config['LOGGING_XMPP_COMMAND']),
|
||||||
|
logging_xmpp_use_tls=(app.config['LOGGING_XMPP_USE_TLS']),
|
||||||
|
)
|
||||||
|
sendxmpp_handler.setLevel(logging.ERROR)
|
||||||
|
app.logger.addHandler(sendxmpp_handler)
|
Loading…
Reference in New Issue
Block a user