I\'m trying to do a test run of the logging module\'s RotatingFileHandler as follows:
import logging
from logging.handlers import R
Going off of Kurt Peek's answer you can also put the rotating file handler in the logging.basicConfig directly
import logging
from logging.handlers import RotatingFileHandler
logging.basicConfig(
handlers=[RotatingFileHandler('./my_log.log', maxBytes=100000, backupCount=10)],
level=logging.DEBUG,
format="[%(asctime)s] %(levelname)s [%(name)s.%(funcName)s:%(lineno)d] %(message)s",
datefmt='%Y-%m-%dT%H:%M:%S')