diff options
author | 2020-08-24 18:06:49 +0000 | |
---|---|---|
committer | 2020-08-24 18:06:49 +0000 | |
commit | d8717dfc2217fd641279d835c53bb5557b4384a7 (patch) | |
tree | d1f48fca0a38e8b85fe00b38e49b18b0e51355a4 /ms/command-executor/src/main/python/server.py | |
parent | d586bc5373e079d03e2387dfeb5f9bf323edd3f6 (diff) | |
parent | 0f0b5a02d777482e0011b3bc7276d410ee643ae8 (diff) |
Merge "Add request IDs in command-executor log"
Diffstat (limited to 'ms/command-executor/src/main/python/server.py')
-rw-r--r-- | ms/command-executor/src/main/python/server.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ms/command-executor/src/main/python/server.py b/ms/command-executor/src/main/python/server.py index c136bd8cc..d506d096b 100644 --- a/ms/command-executor/src/main/python/server.py +++ b/ms/command-executor/src/main/python/server.py @@ -2,7 +2,7 @@ #!/usr/bin/python # -# Copyright (C) 2019 Bell Canada. +# Copyright (C) 2019 - 2020 Bell Canada. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ from concurrent import futures import logging import time import sys +import utils import grpc @@ -52,7 +53,7 @@ def serve(): server.add_insecure_port('[::]:' + port) server.start() - logger.info("Command Executor Server started on %s" % port) + logger.info("Command Executor Server started on %s" % port, extra=utils.getExtraLogData()) try: while True: @@ -62,7 +63,7 @@ def serve(): if __name__ == '__main__': - logging_formater = '%(asctime)s - %(name)s - %(threadName)s - %(levelname)s - %(message)s' + 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() |