Archived
StreamHandler does not accept the 'stream' keyword argument even though the docs say so.
This commit is contained in:
1 parent
0c6af0271d
commit
01a8839fcf
1 file changed
+7
-8
+7
-8
@@ -15,14 +15,13 @@ app = Flask(__name__)
|
|||||||
app.config.from_object('config')
|
app.config.from_object('config')
|
||||||
app.json_encoder = CustomJSONEncoder
|
app.json_encoder = CustomJSONEncoder
|
||||||
|
|
||||||
# if not app.debug:
|
if not app.debug:
|
||||||
# import logging
|
import logging
|
||||||
# from logging import StreamHandler
|
handler = logging.StreamHandler()
|
||||||
# handler = StreamHandler(stream=sys.stderr)
|
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
||||||
# formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
|
handler.setFormatter(formatter)
|
||||||
# handler.setFormatter(formatter)
|
handler.setLevel(logging.INFO)
|
||||||
# handler.setLevel(logging.INFO)
|
app.logger.addHandler(handler)
|
||||||
# app.logger.addHandler(handler)
|
|
||||||
|
|
||||||
def connect_db():
|
def connect_db():
|
||||||
"""Connects to our database."""
|
"""Connects to our database."""
|
||||||
|
|||||||
Reference in new issue
Block a user