summaryrefslogtreecommitdiffstats
path: root/ms/command-executor/src/main/python/server.py
diff options
context:
space:
mode:
authorOleg Mitsura <oleg.mitsura@amdocs.com>2021-11-23 09:23:44 -0500
committerOleg Mitsura <oleg.mitsura@amdocs.com>2021-11-30 07:08:10 -0500
commitc5684c3e3a81d58eedc3dbee3d943ba20c6ddfa5 (patch)
treed5723abaa74498da933299e3887ca25d7717ecc4 /ms/command-executor/src/main/python/server.py
parent886d02197ce3a6b3ecb0c40d191e649b23e3bb91 (diff)
CCSDK-3531 improve cmd-exec returned err msg
Issue-ID: CCSDK-3531 Improve end-user CBA's Python scripts ability to return error messages on failues. See JIRA story for examples: https://jira.onap.org/browse/CCSDK-3531 adds functions send_response_err_msg(err_message) and send_response_err_msg_and_exit(ret_err_msg, code=1) Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: Ideda64dd108f987c3c4515c70daf9f7b6d2b1f2f
Diffstat (limited to 'ms/command-executor/src/main/python/server.py')
-rw-r--r--ms/command-executor/src/main/python/server.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/ms/command-executor/src/main/python/server.py b/ms/command-executor/src/main/python/server.py
index d506d096b..f2f239660 100644
--- a/ms/command-executor/src/main/python/server.py
+++ b/ms/command-executor/src/main/python/server.py
@@ -64,11 +64,5 @@ def serve():
if __name__ == '__main__':
logging_formater = '%(asctime)s|%(request_id)s|%(subrequest_id)s|%(originator_id)s|%(threadName)s|%(name)s|%(levelname)s|%(message)s'
- logging.basicConfig(filename='/opt/app/onap/logs/application.log', level=logging.DEBUG,
- format=logging_formater)
- console = logging.StreamHandler()
- console.setLevel(logging.INFO)
- formatter = logging.Formatter(logging_formater)
- console.setFormatter(formatter)
- logging.getLogger('').addHandler(console)
+ logging.basicConfig(level=logging.INFO, format=logging_formater)
serve()