imageio / imageio-ffmpeg

FFMPEG wrapper for Python
BSD 2-Clause "Simplified" License
233 stars 52 forks source link

logger warnings are a bit much #18

Closed christopherhesse closed 5 years ago

christopherhesse commented 5 years ago

There is a lot of warning output from the logger, and no apparent way to disable it.

There's a python library for warnings in the stdlib: https://docs.python.org/3/library/warnings.html

Using this instead of the root logger would make it easier to discard the logging warnings.

christopherhesse commented 5 years ago

Currently I have to do logging.getLogger().setLevel(logging.ERROR) which disables anything else using the logger package.

christopherhesse commented 5 years ago

My bad, it's actually not the root logger, it might be worth considering the warnings library though.

almarklein commented 5 years ago

Would this help?

logging.getLogger("imageio_ffmpeg").setLevel(logging.ERROR)
christopherhesse commented 5 years ago

Sorry, that's what I started doing after I figured out which logger was being used. I was saying that the warnings package might be a better fit for warnings like this, but I don't care that much since it's disable-able. Thanks for the answer!