code: def max_entries(self, entries):
          
          self._debug_log.info('Changing maximum log entries from {old} to {new}'
                               .format(old=self._log_entries, new=entries))
          self._max_entries = entries
  
          # This is a bit awkward, but since the maxlen can't be changed after instantiation, we have to reverse the
          # deque before re-instantiating it, then reverse the new deque back in order to preserve the reverse order
          # in case any entries are truncated
          self._log_entries.reverse()
          self._log_entries = deque(self._log_entries, maxlen=self._max_entries)
          self._log_entries.reverse()
docs: Chance the maximum number of retained log entries
          :param entries: The maximum number of log entries to retain at any given time
          :type  entries: int