Defines the current configuration of the logger. Can be used at any moment during runtime to modify the logger
        behavior.
        :param command: The command object that holds all the necessary information from the remote process.

def set_configuration(self, command):
        """
        Defines the current configuration of the logger. Can be used at any moment during runtime to modify the logger
        behavior.
        :param command: The command object that holds all the necessary information from the remote process.
        """
        self.permanent_progressbar_slots = command.permanent_progressbar_slots
        self.redraw_frequency_millis = command.redraw_frequency_millis
        self.console_level = command.console_level
        self.task_millis_to_removal = command.task_millis_to_removal

        self.console_format_strftime = command.console_format_strftime
        self.console_format = command.console_format
        self.file_handlers = command.file_handlers

        # If the logger has already been initialized, then clear file handlers and add the new ones
        if len(self.log.handlers) > 0:
            self.log.handlers.clear()

            for handler in self.file_handlers:
                if isinstance(handler, StreamHandler)\
                        and (handler.stream == sys.stdout or handler.stream == sys.stderr):
                    self.critical(LogMessageCommand(text='Cannot use logging.StreamHandler with \'sys.stdout\' nor '
                                                         '\'sys.stderr\' because those are reserved by the logger '
                                                         'process',
                                                    level=logging.CRITICAL))
                    continue

                self.log.addHandler(hdlr=handler)

        # Do not clear exceptions if the user changes the configuration during runtime
        if self.exceptions:
            # If exceptions already exists
            current_length = len(self.exceptions)

            if command.exception_number < current_length:
                # Delete exceptions from the end to desired index to keep most recent exceptions
                range_to_delete = current_length - command.exception_number
                for i in range(range_to_delete):
                    del self.exceptions[-1]

            elif command.exception_number > current_length:
                # Add empty slots at the end
                range_to_add = command.exception_number - current_length
                for i in range(range_to_add):
                    self.exceptions.append('')
        else:
            # Else, initialize a new list
            self.exceptions = command.exception_number * ['']

        # Do not clear messages if the user changes the configuration during runtime
        if self.messages:
            # If messages already exists
            current_length = len(self.messages)

            if command.message_number < current_length:
                # Delete messages from 0 to desired index to keep most recent messages
                range_to_delete = current_length - command.message_number
                for i in range(range_to_delete):
                    del self.messages[0]

            elif command.message_number > current_length:
                # Add empty slots at 0
                range_to_add = command.message_number - current_length
                for i in range(range_to_add):
                    self.messages.insert(0, '')
        else:
            # Else, initialize a new list
            self.messages = command.message_number * ['']