Add on-disk log preservation, configurable install prefix, and log output command #232
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds three related features that improve troubleshooting workflows and make Laminar more accessible to command-line tools and AI coding assistants.
Features
1. On-Disk Log Preservation (
LAMINAR_ON_DISK_LOGS)LAMINAR_ON_DISK_LOGS=Nenvironment variable${LAMINAR_HOME}/archive/JOB/RUN/logLAMINAR_KEEP_RUNDIRS(important for remote build scenarios)2. Configurable Default
LAMINAR_HOMELAMINAR_HOMEis hardcoded to/var/lib/laminar, requiring manual configuration for custom installationsCMAKE_INSTALL_PREFIXto set intelligent default${CMAKE_INSTALL_PREFIX}/var(e.g.,/opt/laminar/var)/var/lib/laminarif not set3. Log Output Command (
laminarc output-log)laminarc output-log JOB [RUN]Motivation
Command-Line CI/CD Workflows
When running builds from command line (not through web UI):
grep,tail,less) cannot be used directlyAI Coding Assistant Integration
Modern AI coding assistants (Claude, GitHub Copilot, etc.) work best with:
This PR makes Laminar logs accessible through standard patterns these tools understand.
Example Usage
Enable on-disk logs (in
/etc/laminar.conf):LAMINAR_ON_DISK_LOGS=4 # Keep 4 most recent logs per jobView logs from command line:
Custom installation path:
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/laminar make install # Now /opt/laminar/var is the default LAMINAR_HOMEImplementation Details
LAMINAR_ON_DISK_LOGS > 0)/opt/laminarinstallationBenefits
✅ Direct log access with standard Unix tools
✅ Better troubleshooting workflow for CI/CD debugging
✅ Easier integration with log analysis tools and AI assistants
✅ More flexible installation options
✅ No breaking changes to existing deployments
✅ Self-contained installations without manual configuration
Related Discussion
This addresses the common need for easier log access in command-line workflows, particularly for: