Skip to content

Commit

Permalink
Update all items all at once instead of modifying the list
Browse files Browse the repository at this point in the history
  • Loading branch information
atharva-2001 committed Dec 6, 2024
1 parent 725f7a3 commit ed39066
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tardis/io/logger/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ def _emit_to_widget(self, level, html_output):
# Update specific level output
output_key = level_to_output.get(level)
if output_key:
self.log_outputs[output_key].append(html_wrapped)
current_objects = self.log_outputs[output_key].objects
self.log_outputs[output_key].objects = current_objects + [html_wrapped]

# Update ALL output
self.log_outputs["ALL"].append(html_wrapped)
current_all_objects = self.log_outputs["ALL"].objects
self.log_outputs["ALL"].objects = current_all_objects + [html_wrapped]

# Update Jupyter display if in jupyter environment
if self.environment == 'jupyter':
Expand Down

0 comments on commit ed39066

Please sign in to comment.