diff --git a/gns3server/web/web_server.py b/gns3server/web/web_server.py index 40179367..8352134f 100644 --- a/gns3server/web/web_server.py +++ b/gns3server/web/web_server.py @@ -36,7 +36,6 @@ from ..compute.port_manager import PortManager from ..compute.qemu import Qemu from ..controller import Controller - # do not delete this import import gns3server.handlers @@ -234,8 +233,11 @@ class WebServer: ssl_context = self._create_ssl_context(server_config) self._loop = asyncio.get_event_loop() - # Asyncio will raise error if coroutine is not called - self._loop.set_debug(True) + + if log.getEffectiveLevel() == logging.DEBUG: + # On debug version we enable info that + # coroutine is not called in a way await/yield from + self._loop.set_debug(True) for key, val in os.environ.items(): log.debug("ENV %s=%s", key, val)