Skip to content

Replace print() with logging in library modules#88

Merged
elliott-ruebush merged 1 commit into
dbetchkal:mainfrom
arpitjain099:chore/replace-print-with-logging
Jul 7, 2026
Merged

Replace print() with logging in library modules#88
elliott-ruebush merged 1 commit into
dbetchkal:mainfrom
arpitjain099:chore/replace-print-with-logging

Conversation

@arpitjain099

@arpitjain099 arpitjain099 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

The utils/ and active_space/ library modules use raw print() for diagnostic messages. This swaps them for logging.getLogger(name) so callers can control verbosity, and messages can be directed to log files instead of just stdout.

Only touches library modules. Scripts like run_audible_transits.py already create their own loggers via get_logger() and are unchanged.

Add logging.getLogger(__name__) to each library module and convert
print() calls to the appropriate log level (info, warning, error,
or debug). Scripts that configure console handlers via get_logger()
are unchanged - they remain the consumer side of the logging setup.

Signed-off-by: arpitjain099 <arpitjain099@gmail.com>

@elliott-ruebush elliott-ruebush left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, this was something on my personal backlog to address

@elliott-ruebush elliott-ruebush merged commit f811d92 into dbetchkal:main Jul 7, 2026
1 check passed
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