You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
pllim
changed the title
Cannot silence warning downstream because you use logger
Cannot silence warning downstream because you use logger (replace logger with warnings?)
Feb 9, 2022
Looking at how loggers are used here, I propose maybe a less controversial solution: Helper functions to globally silence and reset the logger settings. But this is not foolproof because if a downstream package silences it and another package doesn't want that, it can get messy.
A more controversial proposal is as follows:
log.info -- If it is really that important to tell user they are doing something wrong, use warnings. If not, just delete it or use print() + verbose keyword.
log.warning -- warnings.
log.debug -- Use print() + verbose or debug keyword.
specutils/specutils/spectra/spectrum1d.py
Line 18 in 12ff269
The warning is driving me crazy and I cannot use
warnings
to suppress it.I can suppress it like this but it seems very heavy-handed because that affects everything for the whole session.
The text was updated successfully, but these errors were encountered: