Skip to content

Add :append option to -mainlog in prism CLI#279

Merged
davexparker merged 1 commit into
prismmodelchecker:masterfrom
davexparker:mainlog-append
May 16, 2026
Merged

Add :append option to -mainlog in prism CLI#279
davexparker merged 1 commit into
prismmodelchecker:masterfrom
davexparker:mainlog-append

Conversation

@davexparker
Copy link
Copy Markdown
Member

@davexparker davexparker commented May 16, 2026

Summary

  • Extracts -mainlog argument processing into processMainLogSwitch() in PrismCL.java
  • Adds support for a :append suffix (e.g., -mainlog out.log:append) to open the log file in append mode rather than truncating
  • Removes the now-redundant mainLogFilename field (was effectively a local variable)

Test plan

  • ./bin/prism <model> <props> -mainlog out.log — creates/truncates out.log as before
  • ./bin/prism <model> <props> -mainlog out.log:append — appends to out.log on repeated runs
  • -mainlog out.log:unknown — exits with "Unknown option" error message
  • -mainlog with no argument — exits with "No file specified" error

🤖 Generated with Claude Code

@davexparker davexparker merged commit f2e5622 into prismmodelchecker:master May 16, 2026
6 checks passed
@davexparker davexparker deleted the mainlog-append branch May 16, 2026 17:52
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