import { createLogger, installGlobalHandlers } from '@{{PROJECT_NAME}}/logger';

export const logger = createLogger({
  level: import.meta.env.DEV ? 'debug' : 'info',
  service: '{{COMPONENT_NAME}}',
  // Set endpoint to send logs to your backend:
  // endpoint: '/api/logs',
});

// Install global error handlers (client-side only)
if (typeof window !== 'undefined') {
  installGlobalHandlers(logger);
}
