django rotatingfilehandler code example Example: django rotatingfilehandler if DEBUG and os.environ.get('RUN_MAIN', None) != 'true': LOGGING = {}