Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed May 13, 2024
1 parent ba1bee9 commit d2c2163
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ def get_tick_log_events(graphene_info: "ResolveInfo", tick) -> "GrapheneInstigat
return GrapheneInstigationEventConnection(events=[], cursor="", hasMore=False)

records = get_instigation_log_records(graphene_info.context.instance, tick.log_key)

events = []
for record_dict in records:
exc_info = record_dict.get("exc_info")
message = record_dict[LOG_RECORD_METADATA_ATTR]["orig_message"]
# todo, adding this condition is greasy, make it not do that
if LOG_RECORD_METADATA_ATTR in record_dict:
message = record_dict[LOG_RECORD_METADATA_ATTR]["orig_message"]
else:
message = record_dict.get("msg")
if exc_info:
message = f"{message}\n\n{exc_info}"

Expand Down

0 comments on commit d2c2163

Please sign in to comment.