Skip to content

feat(cli): add concore logs to show node output of a study - #690

Open
yadavchiragg wants to merge 1 commit into
ControlCore-Project:devfrom
yadavchiragg:feat/cli-logs
Open

yadavchiragg wants to merge 1 commit into
ControlCore-Project:devfrom
yadavchiragg:feat/cli-logs

Conversation

@yadavchiragg

Copy link
Copy Markdown

Why

After concore build + run, each node writes its stdout to <node>/concoreout.txt. To read it you have to cd into every node directory. There is no CLI command for it, while status/stop/watch exist.

What

concore logs <study_dir> [node]

  • no node: last N lines of every node, with a header per node
  • node given: just that node, unprefixed; unknown node lists the valid names
  • -n/--lines N (default 20), -f/--follow to stream new lines (handles a run truncating the file)
  • before the first run it prints a hint and exits 0
  • output is printed literally (no rich markup interpretation of node output)
  • works for POSIX and Windows run scripts (both write concoreout.txt)

Testing

  • tests/test_logs_command.py (8 tests) and the existing CLI tests
  • ruff format/check clean
  • tried on a generated study

Docs

Added concore logs to concore_cli/README.md

Adds 'concore logs <study_dir> [node]' with --lines and --follow so users can read the concoreout.txt each node writes without cd-ing into every node directory. Includes tests and docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant