Logs format standardization for LMA component

Added file name, line number and function name to logging message format
for troubleshooting purpose
    - This change is related to Grafana's session-db-sync job

Change-Id: Iaadbedfda0fd9cd7fe4b5c09fc05cb6181c400d1
This commit is contained in:
Rahul Khiyani 2019-02-12 11:13:04 -05:00
parent 9771b16e87
commit d8ca55c685
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ logger = logging.getLogger('OpenStack-Helm DB Init')
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(filename)s - %(lineno)d - %(funcName)s - %(message)s')
# Set the formatter and add the handler
ch.setFormatter(formatter)