@@ -0,0 +1,1004 @@
+import logging%0Aimport wpilib%0A%0A%0Aclass PeriodicFilter:%0A    %22%22%22%0A        Periodic Filter to help keep down clutter in the console.%0A        Simply add this filter to your logger and the logger will%0A        only print periodically.%0A%0A        The logger will always print logging levels of WARNING or higher%0A    %22%22%22%0A%0A    def __init__(self, period):%0A        '''%0A         :param period: Wait period (in seconds) between logs%0A        '''%0A%0A        self.period = period%0A        self.loggingLoop = True%0A        self._last_log = -period%0A%0A    def filter(self, record):%0A        %22%22%22Performs filtering action for logger%22%22%22%0A        self._refresh_logger()%0A        return self.parent.loggingLoop or record.levelno %3E logging.INFO%0A%0A    def _refresh_logger(self):%0A        %22%22%22Determine if the log wait period has passed%22%22%22%0A        now = wpilib.Timer.getFPGATimestamp()%0A        self.loggingLoop = False%0A        if now - self.__last_log %3E self.logging_interval:%0A            self.loggingLoop = True%0A            self.__last_log = now%0A

Create Periodic Filter