I have already tried the RotatingFileHandler
, That solution is not what I am looking for. I want a system that will automatically split log file into multiple files if it exceeds a certain limit (ex 10MB).
Already tried this, but this is not what I want.
my_handler = RotatingFileHandler(log_filename, mode='a', maxBytes=1024*1024*10, backupCount=2, encoding=None, delay=0)
Actually Rotating file handler has a rollover thing, which makes the logs neverending but not unlimited. What I mean to say, if my logs cross a certain limit (both files and size), the logs which were taken in the beginning get omitted/deleted.
I know I can simply increase the file size and backup number, but again there is a limit. Which I do not want.