diff --git a/flatisfy/cmds.py b/flatisfy/cmds.py index 6564024..358bcf1 100644 --- a/flatisfy/cmds.py +++ b/flatisfy/cmds.py @@ -234,5 +234,4 @@ def serve(config): # standard logging server = web_app.QuietWSGIRefServer - app.run(host=config["host"], port=config["port"], server=server, - debug=config["debug"]) + app.run(host=config["host"], port=config["port"], server=server) diff --git a/flatisfy/config.py b/flatisfy/config.py index 101ca27..79cc19d 100644 --- a/flatisfy/config.py +++ b/flatisfy/config.py @@ -68,8 +68,6 @@ DEFAULT_CONFIG = { "search_index": None, # Web app port "port": 8080, - # Debug mode for webserver - "debug": False, # Web app host to listen on "host": "127.0.0.1", # Web server to use to serve the webapp (see Bottle deployment doc) @@ -133,7 +131,6 @@ def validate_config(config, check_with_data): assert config["database"] is None or isinstance(config["database"], str) # noqa: E501 - assert isinstance(config["debug"], bool) assert isinstance(config["port"], int) assert isinstance(config["host"], str) assert config["webserver"] is None or isinstance(config["webserver"], str) # noqa: E501 diff --git a/flatisfy/web/app.py b/flatisfy/web/app.py index c765b75..fbd0d02 100644 --- a/flatisfy/web/app.py +++ b/flatisfy/web/app.py @@ -29,6 +29,13 @@ class QuietWSGIRefServer(bottle.WSGIRefServer): # pylint: disable=locally-disabled,too-few-public-methods quiet = True + def run(self, app): + app.log.info( + 'Server is now up and ready! Listening on %s:%s.' % + (self.host, self.port) + ) + super(QuietWSGIRefServer, self).run(app) + def _serve_static_file(filename): """ @@ -54,7 +61,7 @@ def get_app(config): app.install(DatabasePlugin(get_session)) app.install(ConfigPlugin(config)) app.config.setdefault("canister.log_level", logging.root.level) - app.config.setdefault("canister.log_path", None) + app.config.setdefault("canister.log_path", False) app.config.setdefault("canister.debug", False) app.install(canister.Canister()) # Use DateAwareJSONEncoder to dump JSON strings