Skip to content

Use logging module instead of print and warnings. #306

@paquiteau

Description

@paquiteau

Description & use cases

Describe the feature you would like to see in MRI-nufft. Be as specific as possible about what you want to achieve.

  • Python stdlib logging is the defacto standard for managing different levels of outputs, and manage message to the user. Let's use it to tame the sometime too verbose output of MRI-NUFFT.

Suggested implementation

Describe how you envision the feature being implemented. This could include specific functions, classes, or changes to existing code.

  • Set up a per module (per operators as well ?) logger logger = logging.getLogger(__name__)
  • Move eventual print to logger.info
  • Move warnings.warn to logger.warning
  • Use sane default for the logging verbosity, but let the user managed it as well if needed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions