File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 22
33
44def load_log_file (file_path ):
5- with open (file_path , mode = "r" , encoding = "utf-8" ) as event_log_file :
6- return json .load (event_log_file )
5+ with open (file_path , mode = "r" , encoding = "utf-8" ) as file :
6+ return json .load (file )
77
88
99def format_event_log (event_log ):
1010 lines = []
1111 for timestamp , events in event_log .items ():
12- # Convert the events list to a string separated by commas.
12+ # Convert the events list to a string separated by commas
1313 event_list_str = ", " .join (events )
14- # Create a single line string.
14+ # Create a single line string
1515 line = f"{ timestamp } => { event_list_str } "
1616 lines .append (line )
1717
18- # Join all lines with a newline separator.
18+ # Join all lines with a newline separator
1919 return "\n " .join (lines )
2020
2121
You can’t perform that action at this time.
0 commit comments