How best to warn in Python: logs or `warnings`?

This seems quite related to this earlier discussion that @kfindeisen and I caused: Warnings or other not-errors in the Stack. Although that was more about what to do with not-quite-failure conditions, it also proposed using warnings.warn.

I think my main worry now is what happens to those warnings.warn() messages in our logging and production environment. Would they just get swallowed up like print() does, or would they be captured, and how would you know which Task they came from?