I would recommend the following change to the logging out of the box: logging.basicConfig(filename='PortAuto.log',level=logging.CRITICAL) Without this change the default of "DEBUG" fills up the switch flash in about a year of use.