Skip to content

Replace print() statements with proper logging #14

Description

@cnicholas

There are 20+ print() statements scattered throughout production code instead of using proper logging.

Examples

  • Line 82: print(f'\nIn calculate statistics XbarS...')
  • Line 260: print(f'\nIn calculate statistics IMR...')
  • Line 699: print(f'\nEntering call to prepare_data...')
  • Line 720: print(f'\nStarting with {starting_count} groups')

Impact

  • Unprofessional output
  • Can't control verbosity
  • Hard to debug in production
  • Performance impact

Fix

  1. Add module-level logger: logger = logging.getLogger(__name__)
  2. Replace all print() with logger.debug() or logger.info()
  3. Remove debugging output from hot paths

Files

  • analysis_dataset.py

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions