Relative Content

Tag Archive for pythonlog-rotation

RotatingFIleHandler rotates files without exceeding maxBytes

LOGGING[‘handlers’][‘file’] = { ‘level’: ‘DEBUG’, ‘class’: ‘awx.main.utils.handlers.CompressedRotatingFileHandler’, ‘filename’: os.path.join(LOG_PATH, ‘debug.log’), ‘maxBytes’: 1024*100, ‘backupCount’: 5 } I have written this piece of code for file logging in my django application, however each of the log files do not exceed the given maxBytes. When the first file exceeds the maxBytes it immediately creates 5 new log files […]