def METHOD_NAME(self):  # type: () -> None
    if self._log_file:
        try:
            name = self._log_file.name
            self._log_file.close()
            yellow_print('\nLogging is disabled and file {} has been closed'.format(name))
        except Exception as e:  # noqa
            red_print('\nLog file cannot be closed: {}'.format(e))
        finally:
            self._log_file = None