Skip to content

Commit

Permalink
Clean up task logging prefix.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Jan 20, 2024
1 parent 7545b53 commit 795955d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def log_start(self) -> None:
# Note that the following lines must be present at the top of
# the workflow log file for use in reference test runs.
LOG.info(
"Task log format: [CYCLE/TASK/JOB(FLOWS):STATUS] - LOG MESSAGE"
"Task log prefix: CYCLE/TASK[/JOB][(FLOWS)]:STATUS"
)
LOG.info(
f'Run mode: {self.config.run_mode()}',
Expand Down
11 changes: 4 additions & 7 deletions cylc/flow/task_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,12 @@ def __str__(self) -> str:
Format: "<point>/<name>/<job>{<flows>}:status".
"""
if self.state.status == TASK_STATUS_WAITING:
# Don't print pre-incremented submit number.
subnum = "__"
else:
subnum = f"{self.submit_num:02d}"
id_ = self.identity
if self.state.status != TASK_STATUS_WAITING:
id_ += f"/{self.submit_num:02d}"

return (
f"{self.identity}/{subnum}"
f"{stringify_flow_nums(self.flow_nums)}:{self.state}"
f"{id_}{stringify_flow_nums(self.flow_nums)}:{self.state}"
)

def copy_to_reload_successor(self, reload_successor, check_output):
Expand Down

0 comments on commit 795955d

Please sign in to comment.