chore(gitignore): add development log file patterns - Add patterns for .log, .out, and .err files - Add wget-log and download.log patterns - Organize under new "Development Logs" section ```
1.6 KiB
1.6 KiB
Development Logs Policy
📁 Log Location
All development logs should be stored in: /opt/aitbc/dev/logs/
🗂️ Directory Structure
dev/logs/
├── archive/ # Old logs by date
├── current/ # Current session logs
├── tools/ # Download logs, wget logs, etc.
├── cli/ # CLI operation logs
├── services/ # Service-related logs
└── temp/ # Temporary logs
🛡️ Prevention Measures
- Use log aliases:
wgetlog,curllog,devlog - Environment variables:
$AITBC_DEV_LOGS_DIR - Git ignore: Prevents log files in project root
- Cleanup scripts:
cleanlogs,archivelogs
🚀 Quick Commands
# Load log environment
source /opt/aitbc/.env.dev
# Navigate to logs
devlogs # Go to main logs directory
currentlogs # Go to current session logs
toolslogs # Go to tools logs
clilogs # Go to CLI logs
serviceslogs # Go to service logs
# Log operations
wgetlog <url> # Download with proper logging
curllog <url> # Curl with proper logging
devlog "message" # Add dev log entry
cleanlogs # Clean old logs
archivelogs # Archive current logs
# View logs
./dev/logs/view-logs.sh tools # View tools logs
./dev/logs/view-logs.sh recent # View recent activity
📋 Best Practices
- Never create log files in project root
- Always use proper log directories
- Use log aliases for common operations
- Clean up old logs regularly
- Archive important logs before cleanup