Files
Sankofa/api/src/lib/replace-console-logs.sh

18 lines
585 B
Bash
Raw Normal View History

#!/bin/bash
# Script to replace console.log/error/warn with logger in API services
# This is a helper script - manual review recommended
find api/src -type f -name "*.ts" -not -path "*/node_modules/*" -not -path "*/__tests__/*" | while read file; do
# Skip if already has logger import
if grep -q "from '../lib/logger'" "$file" || grep -q "from './lib/logger'" "$file"; then
continue
fi
# Check if file uses console
if grep -q "console\." "$file"; then
echo "File uses console: $file"
# Note: Manual replacement recommended for proper import paths
fi
done