Fix Error in get-logs request LogEvent instance is not JSON serializable

This commit is contained in:
Jorge Marcial Álvarez Gago 2017-10-20 12:16:53 +02:00
parent efefc1714e
commit 456e5cd25c

View File

@ -89,7 +89,7 @@ class LogsResponse(BaseResponse):
self.logs_backend.get_log_events(log_group_name, log_stream_name, start_time, end_time, limit, next_token, start_from_head) self.logs_backend.get_log_events(log_group_name, log_stream_name, start_time, end_time, limit, next_token, start_from_head)
return json.dumps({ return json.dumps({
"events": events, "events": [ob.__dict__ for ob in events],
"nextBackwardToken": next_backward_token, "nextBackwardToken": next_backward_token,
"nextForwardToken": next_foward_token "nextForwardToken": next_foward_token
}) })