Skip to content

Implement logger for roman_photoz#15

Merged
mairanteodoro merged 4 commits intospacetelescope:mainfrom
mairanteodoro:RCAL-1039-logger
May 1, 2025
Merged

Implement logger for roman_photoz#15
mairanteodoro merged 4 commits intospacetelescope:mainfrom
mairanteodoro:RCAL-1039-logger

Conversation

@mairanteodoro
Copy link
Collaborator

@mairanteodoro mairanteodoro commented Apr 18, 2025

This PR addresses the implementation of a logger module, which added a centralized logging configuration in __init__.py with:

  • a setup_logging() function that configures the logger;
  • a module-level logger instance that can be imported throughout the package.

The logging implementation allows for consistent logging throughout the module with proper log levels (info, warning, error, exception). The log messages will be written to the console, making it easier to track the execution of the code and diagnose issues.

Copy link
Collaborator

@schlafly schlafly left a comment

Choose a reason for hiding this comment

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

Thanks Mairan, this looks reasonable to me. If this makes a log file every time we run, though, I think we should reconsider; I don't think we want to make an additional product to archive, etc.. If the log file is optional, that makes more sense, or if we can put the logs in the ordinary output file rather than writing it out, that would also make sense.

@mairanteodoro mairanteodoro merged commit 9941ee8 into spacetelescope:main May 1, 2025
2 checks passed
mairanteodoro added a commit to mairanteodoro/roman_photoz that referenced this pull request May 2, 2025
* Implement logger for roman_photoz.

* Prevent logger from writing to file.

* Resolve conflicts.
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