def set_log_rotate_handler(self, set_file):
        '''Enables/disables logs to be written to files

        Arguments:
            set_file (:obj:`bool`): False disables, True enables

        '''
        if hasattr(self, 'debug_handler'):
            if set_file:
                self.log.addHandler(self.debug_handler)
                self.log.addHandler(self.error_handler)
            else:
                try:
                    self.log.removeHandler(self.error_handler)
                    self.log.removeHandler(self.debug_handler)
                except Exception:
                    pass
        else:
            self.log.debug('The file log handlers were not created. It is not\
                           possible to write to the log files.')
Enables/disables logs to be written to files

        Arguments:
            set_file (:obj:`bool`): False disables, True enables