Skip to content

Conversation

@jdorfman
Copy link
Member

Summary

This PR migrates scattered console.log, console.error, and console.warn calls
to use the structured logger utility from @podcast-index/shared-ui.

Why Structured Logging?

  • Consistent format: All logs follow the same structure
  • Metadata support: Variables are captured as searchable metadata
  • Log levels: Proper info, warn, error categorization
  • Production ready: Easy to integrate with log aggregation services

Transformation Examples

Before After
console.log('msg:', var) logger.info('msg', { var })
console.error('failed:', err) logger.error('failed', { err })
console.warn('warning') logger.warn('warning')

Files Changed

  • API route handlers
  • Server actions
  • Data access layer

Test Plan

  • Verify application starts without errors
  • Check that logs appear in expected format
  • Confirm no remaining console.log/error/warn calls (except in logger.ts)

Generated by Sourcegraph Batch Changes using comby for AST-level transformations

Created by Sourcegraph batch change justin.dorfman/Complex-Rewrite-Logic.

Replace scattered console.log/error/warn calls with structured logger
that outputs consistent JSON-formatted logs with metadata.

This transformation was performed using comby for AST-aware code changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants