summaryrefslogtreecommitdiffstats
path: root/cvp/opnfv_testapi/cmd/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'cvp/opnfv_testapi/cmd/server.py')
-rw-r--r--cvp/opnfv_testapi/cmd/server.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cvp/opnfv_testapi/cmd/server.py b/cvp/opnfv_testapi/cmd/server.py
index a5ac5eb6..d503c8a1 100644
--- a/cvp/opnfv_testapi/cmd/server.py
+++ b/cvp/opnfv_testapi/cmd/server.py
@@ -30,11 +30,18 @@ TODOs :
"""
import tornado.ioloop
+import logging
from opnfv_testapi.common.config import CONF
from opnfv_testapi.router import url_mappings
from opnfv_testapi.tornado_swagger import swagger
+my_logger = logging.getLogger()
+handler = logging.handlers.RotatingFileHandler(
+ CONF.api_log_file, maxBytes=20000000, backupCount=50)
+my_logger.setLevel(logging.DEBUG)
+my_logger.addHandler(handler)
+
def make_app():
swagger.docs(base_url=CONF.swagger_base_url,