Skip to content

Remove output redirection from shell scripts#24

Open
losolio wants to merge 1 commit intomasterfrom
feature/flex-output
Open

Remove output redirection from shell scripts#24
losolio wants to merge 1 commit intomasterfrom
feature/flex-output

Conversation

@losolio
Copy link
Contributor

@losolio losolio commented Feb 14, 2026

Output now goes directly to stdout/stderr. Callers can redirect as needed. CI workflow updated to use tee for console output + log file.

BREAKING: logs/*.log files are no longer created automatically. Use ./execute_all.sh ... 2>&1 | tee logs/execute_all.log if needed.

Alternatives to this approach could be to set output depending on env vars, github actions sets CI=true, which could be used as a flag, but this approach gives most flexibility, however the caller must specifiy the output after this.

An alternative approach could be to make separate scripts for console logging?

Output now goes directly to stdout/stderr. Callers can redirect as needed.

CI workflow updated to use `tee` for console output + log file.

BREAKING: logs/*.log files are no longer created automatically.
Use `./execute_all.sh ... 2>&1 | tee logs/execute_all.log` if needed.
Copilot AI review requested due to automatic review settings February 14, 2026 13:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes automatic output redirection from the repository’s shell wrappers so that rake task output goes straight to stdout/stderr, and updates CI/documentation to show callers how to capture logs explicitly (e.g., via tee).

Changes:

  • Remove > logs/*.log 2>&1 redirection from list_all.sh, execute_test.sh, and execute_all.sh.
  • Update CI to pipe execute_all.sh output through tee to both console and a log file.
  • Document the new logging approach in README.md, including tee examples.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
list_all.sh Stops redirecting output to logs/list_all.log; output now goes to stdout/stderr.
execute_test.sh Stops redirecting output to logs/execute_$TEST.log; output now goes to stdout/stderr.
execute_all.sh Stops redirecting output to logs/execute_all.log; output now goes to stdout/stderr.
README.md Adds a “Logging Output” section with tee/redirection examples.
.github/workflows/ci.yml Updates CI run step to use tee to capture console output into logs/execute_all.log.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +48 to +57
The shell scripts output directly to stdout/stderr. To save logs to a file while also displaying output, use `tee`:

```
$ ./execute_all.sh http://localhost:8080/fhir r4 'html|json|stdout' 2>&1 | tee logs/execute_all.log
```

To redirect output to a file only (silent):

```
$ ./execute_all.sh http://localhost:8080/fhir r4 'html|json|stdout' > logs/execute_all.log 2>&1
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logging examples write to logs/execute_all.log, but logs/ may not exist anymore (and this PR explicitly removes automatic log creation). As written, the commands will fail with “No such file or directory” if logs/ hasn’t been created. Consider updating the examples to include mkdir -p logs (or mention that callers must create the directory first).

Copilot uses AI. Check for mistakes.
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.

2 participants