#!/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

