Skip to content

Commit

Permalink
Update logdir creation to support centralized log storage
Browse files Browse the repository at this point in the history
  • Loading branch information
collijk committed Jan 29, 2025
1 parent a96e0bf commit 75f12aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Better logdir creation for different workflows.

## [1.0.22] - 2024-12-31
### Fixed
Expand Down
5 changes: 4 additions & 1 deletion src/rra_tools/jobmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ def make_log_dir(
output_dir: str | Path,
) -> Path:
run_time = datetime.datetime.now().strftime("%Y_%m_%d_%H_%M_%S") # noqa: DTZ005
log_dir = Path(output_dir) / "zzz_logs" / run_time
if "logs" in str(output_dir):
log_dir = Path(output_dir) / run_time
else:
log_dir = Path(output_dir) / "zzz_logs" / run_time
mkdir(log_dir, parents=True)
mkdir(log_dir / "output")
mkdir(log_dir / "error")
Expand Down

0 comments on commit 75f12aa

Please sign in to comment.