/**
 * Debug Logs - Server-only exports
 * Contains debugLogger instance that uses process.env.API_URL
 */

import { DebugLogger } from './debug-logger'

function getApiUrl(): string {
  if (typeof process !== 'undefined' && process.env?.API_URL) {
    return process.env.API_URL
  }
  return 'http://localhost:5170'
}

/**
 * Default debug logger instance for Node.js environments
 * Automatically detects production vs development from API_URL env var
 */
export const debugLogger = new DebugLogger(getApiUrl(), 'core')
