25👍
✅
You can change the factory_boy logging level with:
import logging
logging.getLogger("factory").setLevel(logging.WARN)
Replacing WARN
with whatever level you want. I don’t know where to put this in a Django environment, but you can put this in your test file or some global initializer.
This should suppress any logging except actual factory_boy errors & warnings.
Weird default, since factory_boy debugging is rarely helpful and is incredibly verbose.
Source:stackexchange.com