Task 1.1 - Setup logging for the main CLI application
Parent Issue: #2 (Scaffolding for main app)
Roadmap: Section 1.1
📋 Overview
Implement production-ready logging configuration for the main torrust-tracker-deployer CLI binary. Currently, logging infrastructure exists and is used in E2E test binaries, but the main application entry point lacks logging initialization.
🎯 Goals
- Initialize logging in main CLI when the application starts
- Add CLI arguments for logging configuration (
--log-format, --log-output, --log-dir)
- Use production-ready defaults (file-only logging, compact format)
- Create user and contributor documentation
📐 Implementation Plan
Phase 1: Basic CLI Structure (1-2 hours)
Phase 2: Argument Validation (1 hour)
Phase 3: Documentation (1-1.5 hours)
Phase 4: Integration Testing (30-45 minutes)
📄 Detailed Specification
Complete specification available at: docs/issues/3-setup-logging-for-production-cli.md
The specification includes:
- Detailed CLI argument structure
- Code examples for
src/app.rs and src/main.rs
- Default behavior specifications
- Testing strategy
- Acceptance criteria
⏱️ Estimated Effort
Total: 4-5 hours
- Phase 1: 1-2 hours (7 subtasks)
- Phase 2: 1 hour (3 subtasks)
- Phase 3: 1-1.5 hours (4 subtasks)
- Phase 4: 0.5-0.75 hours (6 subtasks)
- Buffer: 0.5 hours
✅ Acceptance Criteria
🔗 Related
Task 1.1 - Setup logging for the main CLI application
Parent Issue: #2 (Scaffolding for main app)
Roadmap: Section 1.1
📋 Overview
Implement production-ready logging configuration for the main
torrust-tracker-deployerCLI binary. Currently, logging infrastructure exists and is used in E2E test binaries, but the main application entry point lacks logging initialization.🎯 Goals
--log-format,--log-output,--log-dir)📐 Implementation Plan
Phase 1: Basic CLI Structure (1-2 hours)
clapdependency toCargo.tomlsrc/app.rsmodule withClistruct andrun()functionsrc/main.rsto callapp::run()LoggingBuilderPhase 2: Argument Validation (1 hour)
Phase 3: Documentation (1-1.5 hours)
docs/user-guide/logging.mdfor end usersdocs/contributing/logging-guide.mdfor contributorsPhase 4: Integration Testing (30-45 minutes)
📄 Detailed Specification
Complete specification available at:
docs/issues/3-setup-logging-for-production-cli.mdThe specification includes:
src/app.rsandsrc/main.rs⏱️ Estimated Effort
Total: 4-5 hours
✅ Acceptance Criteria
src/app.rsmodule created withrun()functionsrc/main.rsis minimal (only callsapp::run())--log-format,--log-output,--log-dirargumentsdocs/user-guide/logging.mddocs/contributing/logging-guide.mdcargo run --bin linter all)./scripts/pre-commit.sh)🔗 Related
docs/issues/3-setup-logging-for-production-cli.md