Skip to content

Commit

Permalink
Update Source key and seperate log attribute (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
kashyap-thacker authored Jul 19, 2023
1 parent cbc6c95 commit 33a4e17
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python_common_logger/src/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ def create_json_formatter(service_name: str, context_config:dict=None, date_form
Formatter: Log formatter
"""
log_format = {
"source": f"{service_name}",
"src": f"{service_name}",
"time": "%(asctime)s",
"log": {
"message": "[%(filename)s:%(funcName)s:%(lineno)s] %(message)s"
"message": "%(message)s",
"filename": "%(filename)s",
"funcName": "%(funcName)s",
"lineno": "%(lineno)s"
},
"logLevel": "%(levelname)s"
}
Expand Down

0 comments on commit 33a4e17

Please sign in to comment.