Skip to content

Commit

Permalink
dont bind if LDPRELOAD is used.
Browse files Browse the repository at this point in the history
  • Loading branch information
hariharan-devarajan committed Oct 6, 2023
1 parent 4004194 commit a0cb02c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions dlio_profiler/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,12 @@ def get_instance(cls, log_file=None):

@staticmethod
def initialize_log(logfile, data_dir, process_id):
log_file = "Dummy"
if not DLIO_PROFILER_INIT_PRELOAD:
log_file = Path(logfile)
log_file = Path(logfile)
instance = dlio_logger.get_instance(log_file)
if DLIO_PROFILER_ENABLE:
if not DLIO_PROFILER_INIT_PRELOAD:
os.makedirs(log_file.parent, exist_ok=True)
if os.path.isfile(log_file):
os.remove(log_file)
os.makedirs(log_file.parent, exist_ok=True)
if os.path.isfile(log_file):
os.remove(log_file)
instance.logger = profiler
instance.logger.initialize(f"{instance.logfile}", f"{data_dir}", process_id=process_id)
return instance
Expand Down

0 comments on commit a0cb02c

Please sign in to comment.