Some checks failed
AITBC CI/CD Pipeline / lint-and-test (3.11) (push) Has been cancelled
AITBC CI/CD Pipeline / lint-and-test (3.12) (push) Has been cancelled
AITBC CI/CD Pipeline / lint-and-test (3.13) (push) Has been cancelled
AITBC CI/CD Pipeline / test-cli (push) Has been cancelled
AITBC CI/CD Pipeline / test-services (push) Has been cancelled
AITBC CI/CD Pipeline / test-production-services (push) Has been cancelled
AITBC CI/CD Pipeline / security-scan (push) Has been cancelled
AITBC CI/CD Pipeline / build (push) Has been cancelled
AITBC CI/CD Pipeline / deploy-staging (push) Has been cancelled
AITBC CI/CD Pipeline / deploy-production (push) Has been cancelled
AITBC CI/CD Pipeline / performance-test (push) Has been cancelled
AITBC CI/CD Pipeline / docs (push) Has been cancelled
AITBC CI/CD Pipeline / release (push) Has been cancelled
AITBC CI/CD Pipeline / notify (push) Has been cancelled
Security Scanning / Bandit Security Scan (apps/coordinator-api/src) (push) Has been cancelled
Security Scanning / Bandit Security Scan (cli/aitbc_cli) (push) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-core/src) (push) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-crypto/src) (push) Has been cancelled
Security Scanning / Bandit Security Scan (packages/py/aitbc-sdk/src) (push) Has been cancelled
Security Scanning / Bandit Security Scan (tests) (push) Has been cancelled
Security Scanning / CodeQL Security Analysis (javascript) (push) Has been cancelled
Security Scanning / CodeQL Security Analysis (python) (push) Has been cancelled
Security Scanning / Dependency Security Scan (push) Has been cancelled
Security Scanning / Container Security Scan (push) Has been cancelled
Security Scanning / OSSF Scorecard (push) Has been cancelled
Security Scanning / Security Summary Report (push) Has been cancelled
AITBC CLI Level 1 Commands Test / test-cli-level1 (3.11) (push) Has been cancelled
AITBC CLI Level 1 Commands Test / test-cli-level1 (3.12) (push) Has been cancelled
AITBC CLI Level 1 Commands Test / test-cli-level1 (3.13) (push) Has been cancelled
AITBC CLI Level 1 Commands Test / test-summary (push) Has been cancelled
- Remove debugging service documentation (DEBUgging_SERVICES.md) - Remove development logs policy and quick reference guides - Remove E2E test creation summary - Remove gift certificate example file - Remove GitHub pull summary documentation
162 lines
4.4 KiB
Markdown
162 lines
4.4 KiB
Markdown
# AITBC Development Logs - Quick Reference
|
|
|
|
## 🎯 **Problem Solved:**
|
|
- ✅ **wget-log** moved from project root to `/opt/aitbc/dev/logs/tools/`
|
|
- ✅ **Prevention measures** implemented to avoid future scattered logs
|
|
- ✅ **Log organization system** established
|
|
|
|
## 📁 **New Log Structure:**
|
|
```
|
|
/opt/aitbc/dev/logs/
|
|
├── archive/ # Old logs organized by date
|
|
├── current/ # Current session logs
|
|
├── tools/ # Download logs, wget logs, curl logs
|
|
├── cli/ # CLI operation logs
|
|
├── services/ # Service-related logs
|
|
└── temp/ # Temporary logs
|
|
```
|
|
|
|
## 🛡️ **Prevention Measures:**
|
|
|
|
### **1. Environment Configuration:**
|
|
```bash
|
|
# Load log environment (automatic in .env.dev)
|
|
source /opt/aitbc/.env.dev.logs
|
|
|
|
# Environment variables available:
|
|
$AITBC_DEV_LOGS_DIR # Main logs directory
|
|
$AITBC_CURRENT_LOG_DIR # Current session logs
|
|
$AITBC_TOOLS_LOG_DIR # Tools/download logs
|
|
$AITBC_CLI_LOG_DIR # CLI operation logs
|
|
$AITBC_SERVICES_LOG_DIR # Service logs
|
|
```
|
|
|
|
### **2. Log Aliases:**
|
|
```bash
|
|
devlogs # cd to main logs directory
|
|
currentlogs # cd to current session logs
|
|
toolslogs # cd to tools logs
|
|
clilogs # cd to CLI logs
|
|
serviceslogs # cd to service logs
|
|
|
|
# Logging commands:
|
|
wgetlog <url> # wget with proper logging
|
|
curllog <url> # curl with proper logging
|
|
devlog "message" # add dev log entry
|
|
cleanlogs # clean old logs (>7 days)
|
|
archivelogs # archive current logs (>1 day)
|
|
```
|
|
|
|
### **3. Management Tools:**
|
|
```bash
|
|
# View logs
|
|
./dev/logs/view-logs.sh tools # view tools logs
|
|
./dev/logs/view-logs.sh current # view current logs
|
|
./dev/logs/view-logs.sh recent # view recent activity
|
|
|
|
# Organize logs
|
|
./dev/logs/organize-logs.sh # organize scattered logs
|
|
|
|
# Clean up logs
|
|
./dev/logs/cleanup-logs.sh # cleanup old logs
|
|
```
|
|
|
|
### **4. Git Protection:**
|
|
```bash
|
|
# .gitignore updated to prevent log files in project root:
|
|
*.log
|
|
*.out
|
|
*.err
|
|
wget-log
|
|
download.log
|
|
```
|
|
|
|
## 🚀 **Best Practices:**
|
|
|
|
### **DO:**
|
|
✅ Use `wgetlog <url>` instead of `wget <url>`
|
|
✅ Use `curllog <url>` instead of `curl <url>`
|
|
✅ Use `devlog "message"` for development notes
|
|
✅ Store all logs in `/opt/aitbc/dev/logs/`
|
|
✅ Use log aliases for navigation
|
|
✅ Clean up old logs regularly
|
|
|
|
### **DON'T:**
|
|
❌ Create log files in project root
|
|
❌ Use `wget` without `-o` option
|
|
❌ Use `curl` without output redirection
|
|
❌ Leave scattered log files
|
|
❌ Ignore log organization
|
|
|
|
## 📋 **Quick Commands:**
|
|
|
|
### **For Downloads:**
|
|
```bash
|
|
# Instead of: wget http://example.com/file
|
|
# Use: wgetlog http://example.com/file
|
|
|
|
# Instead of: curl http://example.com/api
|
|
# Use: curllog http://example.com/api
|
|
```
|
|
|
|
### **For Development:**
|
|
```bash
|
|
# Add development notes
|
|
devlog "Fixed CLI permission issue"
|
|
devlog "Added new exchange feature"
|
|
|
|
# Navigate to logs
|
|
devlogs
|
|
toolslogs
|
|
clilogs
|
|
```
|
|
|
|
### **For Maintenance:**
|
|
```bash
|
|
# Clean up old logs
|
|
cleanlogs
|
|
|
|
# Archive current logs
|
|
archivelogs
|
|
|
|
# View recent activity
|
|
./dev/logs/view-logs.sh recent
|
|
```
|
|
|
|
## 🎉 **Results:**
|
|
|
|
### **Before:**
|
|
- ❌ `wget-log` in project root
|
|
- ❌ Scattered log files everywhere
|
|
- ❌ No organization system
|
|
- ❌ No prevention measures
|
|
|
|
### **After:**
|
|
- ✅ All logs organized in `/opt/aitbc/dev/logs/`
|
|
- ✅ Proper directory structure
|
|
- ✅ Prevention measures in place
|
|
- ✅ Management tools available
|
|
- ✅ Git protection enabled
|
|
- ✅ Environment configured
|
|
|
|
## 🔧 **Implementation Status:**
|
|
|
|
| Component | Status | Details |
|
|
|-----------|--------|---------|
|
|
| **Log Organization** | ✅ COMPLETE | All logs moved to proper locations |
|
|
| **Directory Structure** | ✅ COMPLETE | Hierarchical organization |
|
|
| **Prevention Measures** | ✅ COMPLETE | Aliases, environment, git ignore |
|
|
| **Management Tools** | ✅ COMPLETE | View, organize, cleanup scripts |
|
|
| **Environment Config** | ✅ COMPLETE | Variables and aliases loaded |
|
|
| **Git Protection** | ✅ COMPLETE | Root log files ignored |
|
|
|
|
## 🚀 **Future Prevention:**
|
|
|
|
1. **Automatic Environment**: Log aliases loaded automatically
|
|
2. **Git Protection**: Log files in root automatically ignored
|
|
3. **Cleanup Scripts**: Regular maintenance automated
|
|
4. **Management Tools**: Easy organization and viewing
|
|
5. **Documentation**: Clear guidelines and best practices
|
|
|
|
**🎯 The development logs are now properly organized and future scattered logs are prevented!**
|