Skip to content

Commit

Permalink
Update logging_formatter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tzole1155 committed Sep 3, 2024
1 parent ebb68ae commit 1371c78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions moai/serve/handlers/logging_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def __init__(
# datefmt='%Y-%m-%d %H:%M:%S',
# )
self.input_key = input_key
log.info(f"GuidLogFilter: {self.input_key}")

def __call__(
self,
Expand All @@ -41,7 +42,9 @@ def __call__(
handler = logging.StreamHandler()
handler.setFormatter(self.formatter)
# get guid from input request
log.info(f"GuidLogFilter: {data}")
guid = data.get(self.input_key)
log.info(f"GuidLogFilter: {guid}")
# handler.addFilter(logging.Filter(guid))
# log.addHandler(handler)
# Add filter to handler
Expand Down

0 comments on commit 1371c78

Please sign in to comment.