From 41b2089a280184dd59e0026766ea000a00e015d0 Mon Sep 17 00:00:00 2001 From: gifrerenom <lluis.gifre@cttc.es> Date: Wed, 30 Oct 2024 23:11:34 +0000 Subject: [PATCH] Debug OFC24 and Optical Controller --- src/opticalcontroller/OpticalController.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/opticalcontroller/OpticalController.py b/src/opticalcontroller/OpticalController.py index de4d3ae54..c6c00fe9a 100644 --- a/src/opticalcontroller/OpticalController.py +++ b/src/opticalcontroller/OpticalController.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import time +import logging, time from flask import Flask from flask import render_template from flask_restplus import Resource, Api @@ -22,6 +22,8 @@ from opticalcontroller.tools import * from opticalcontroller.variables import * from opticalcontroller.RSA import RSA +logging.basicConfig(level=logging.INFO) +LOGGER = logging.getLogger(__name__) global rsa global links_dict @@ -355,6 +357,7 @@ class GetTopology(Resource): print(rsa.init_link_slots2()) return "ok", 200 except Exception as e: + LOGGER.exception('Error in GetTopology') print(f"err {e}") return "Error", 400 -- GitLab