Skip to content

Commit

Permalink
Make logs be written to correct file.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcdermott committed Jun 16, 2024
1 parent 70352b6 commit aec23c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MEDS_polars_functions/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def hydra_loguru_init() -> None:
Must be called from a hydra main!
"""
hydra_path = hydra.core.hydra_config.HydraConfig.get().runtime.output_dir
logger.add(os.path.join(hydra_path, "main.log"))
logfile_name = hydra.core.hydra_config.HydraConfig.get().job.name
logger.add(os.path.join(hydra_path, f"{logfile_name}.log"))


def write_lazyframe(df: pl.LazyFrame, out_fp: Path) -> None:
Expand Down

0 comments on commit aec23c8

Please sign in to comment.