I implemented the RotatingFileHandler as belolw.
According to this manual, The file being written to is always app.log.
However, in my case, the size of already rotated log file, which has “.1” appended to the end of its file name, increases and the content actually changes.
app.log increases, too.
Why is this happening?
logger = logging.getLogger(moduleName) logger.setLevel(LOG_LEVEL) h_format = logging.Formatter( "%(asctime)0.19s - %(module)s [%(levelname)s] %(message)s " ) fh = logging.handlers.RotatingFileHandler("/var/log/app.log", maxBytes=100000, backupCount=10) fh.setLevel(LOG_LEVEL) fh.setFormatter(h_format) logger.addHandler(fh)