Mar-21-2022, 05:29 PM
I would advice to use Loguru.
Usage is simpler and cleaner(no boilerplate),than the one in standard library.
Usage is simpler and cleaner(no boilerplate),than the one in standard library.
from loguru import logger import time #logger.remove() # Only info to file logger.add("file.log", rotation="2 day") @logger.catch def foo(): return 1 / 0 foo()
![[Image: kPV7uG.png]](https://imagizer.imageshack.com/v2/xq90/922/kPV7uG.png)