Commit 3fd2f507 authored by Marco Mariani's avatar Marco Mariani

copy handlers to flask's app.logger

parent e67e7b55
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
# #
############################################################################## ##############################################################################
import logging
class ProxyConfig(object): class ProxyConfig(object):
def __init__(self, logger): def __init__(self, logger):
...@@ -53,6 +55,9 @@ class ProxyConfig(object): ...@@ -53,6 +55,9 @@ class ProxyConfig(object):
def do_proxy(conf): def do_proxy(conf):
from slapos.proxy.views import app from slapos.proxy.views import app
for handler in conf.logger.handlers:
app.logger.addHandler(handler)
app.logger.setLevel(logging.INFO)
app.config['computer_id'] = conf.computer_id app.config['computer_id'] = conf.computer_id
app.config['DATABASE_URI'] = conf.database_uri app.config['DATABASE_URI'] = conf.database_uri
app.run(host=conf.host, port=int(conf.port)) app.run(host=conf.host, port=int(conf.port))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment