From 9432d9361e1fca5cca4bc47bb8bfaa13d1db514b Mon Sep 17 00:00:00 2001 From: nicolargo Date: Sat, 24 Aug 2024 15:53:20 +0200 Subject: [PATCH] Improve user message when Glances WebUI/RestAPI is ran --- glances/outputs/glances_restful_api.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/glances/outputs/glances_restful_api.py b/glances/outputs/glances_restful_api.py index f2d43ed8b2..d19f0873f4 100644 --- a/glances/outputs/glances_restful_api.py +++ b/glances/outputs/glances_restful_api.py @@ -269,10 +269,6 @@ def _router(self): endpoint=self._api_value, ) - # Restful API - bindmsg = f'Glances RESTful API Server started on {self.bind_url}api/{self.API_VERSION}' - logger.info(bindmsg) - # WEB UI if not self.args.disable_webui: # Template for the root index.html file @@ -281,12 +277,16 @@ def _router(self): # Statics files self._app.mount(self.url_prefix + '/static', StaticFiles(directory=self.STATIC_PATH), name="static") - logger.info(f"Get WebUI in {self.STATIC_PATH}") + logger.info(f"The WebUI is enable and got statics files in {self.STATIC_PATH}") bindmsg = f'Glances Web User Interface started on {self.bind_url}' + logger.info(bindmsg) + print(bindmsg) else: - bindmsg = 'The WebUI is disable (--disable-webui)' + logger.info('The WebUI is disable (--disable-webui)') + # Restful API + bindmsg = f'Glances RESTful API Server started on {self.bind_url}api/{self.API_VERSION}' logger.info(bindmsg) print(bindmsg)