fxstein / fxstein/GoProX

Enhancement: Add Robust Logging to Automation and Release Scripts

Open
#71 0 comments 0 reactions 1 assignee Claimed by @fxstein View on GitHub
architecture diagnostics enhancement
Dominant language
Shell
Stars
27
Forks
4
PR merge metrics
No merged PRs in 30d

Description

## Summary

Implement enhanced logging for all automation and release scripts to improve diagnostics, maintainability, and transparency. This is a key architectural improvement linked to the ongoing git-flow and workflow modernization (see Issue #20).

## Motivation
- Current scripts provide minimal feedback on errors or process steps, making it difficult to diagnose failures (e.g., silent exits in release scripts).
- Enhanced logging will support maintainers, speed up debugging, and improve CI/CD reliability.

## Recommendations

### 1. Inline Console Logging
- Add clear [INFO], [WARN], [ERROR] messages before/after critical steps and on error paths.
- Use `echo` or similar for immediate feedback.

### 2. Dedicated Log File Output
- Write logs to a persistent file (e.g., output/release.log) for post-mortem analysis.
- Use `tee -a` to log both to console and file.

### 3. Verbosity/Debug Flags
- Add --verbose or --debug flags to control log detail.
- Default to concise output, but allow deep diagnostics when needed.

### 4. Error Trapping
- Use `trap` and custom error handlers to log the last command and line number on failure.
- Print stack traces or error context for easier debugging.

## Implementation Plan
- Start with release and core automation scripts.
- Add logging functions and error traps.
- Document logging usage in CONTRIBUTING.md and AI_INSTRUCTIONS.md.
- Test with both normal and failure scenarios.

## Acceptance Criteria
- All critical scripts log key steps, errors, and outcomes to both console and file.
- Verbosity can be toggled.
- Error context is captured on failure.
- Linked to Issue #20 (git-flow/architecture).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.