def _get_log_file(self):
        """Returns opened file object for writing dialog logs.

        Returns:
            log_file: opened Python file object.
        """
        log_dir: Path = Path(self.config['log_path']).expanduser().resolve() / self.logger_name
        log_dir.mkdir(parents=True, exist_ok=True)
        log_file_path = Path(log_dir, f'{self._get_timestamp_utc_str()}_{self.logger_name}.log')
        log_file = open(log_file_path, 'a', buffering=1, encoding='utf8')
        return log_file
Returns opened file object for writing dialog logs.

        Returns:
            log_file: opened Python file object.
        
deeppavlov/utils/connector/dialog_logger.py