Skip to content

Commit

Permalink
Only perform logging operations when logging is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Kreynen committed Jul 11, 2023
1 parent 16d18be commit ed2b0b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions netqasm/runtime/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,9 @@ def simulate(
enable_logging=log_to_files,
hardware=hardware,
)
create_app_instr_logs(log_cfg.log_subroutines_dir)
make_last_log(log_cfg.log_subroutines_dir)
if log_to_files:
create_app_instr_logs(log_cfg.log_subroutines_dir)
make_last_log(log_cfg.log_subroutines_dir)

if timer:
print(f"finished simulation in {round(time.perf_counter() - start, 2)} seconds")
Expand Down

0 comments on commit ed2b0b4

Please sign in to comment.