Closed skarrea closed 3 years ago
@skarrea would you like to just remove that line? That would respect the user-set level. And for #157 - another idea is to remove that line all-together, or put it at a higher level where it's needed (perhaps get/set identifiers). Would that work for a fix?
Please see https://github.com/pydicom/deid/pull/159 as a suggested solution.
Yes, that is perfect!
When trying to suppress the error message mentioned in #157 I noticed that
bot.level = 3
is assigned in line 38 of deid/deid/config/__init__.py. Thus regardless of the specifiedMESSAGELEVEL
in the environment variables which is used in the DeidMessage class the bot will change to level 3 when importing DeidRecipe.Reproducing the behavior:
This code reproduces the aforementioned behavior:
Output