def get_logging_file_handler(logger=None, file=None, formatter=LOGGING_DEFAULT_FORMATTER):
    """
    Adds a logging file handler to given logger or default logger using given file.

    :param logger: Logger to add the handler to.
    :type logger: Logger
    :param file: File to verbose into.
    :type file: unicode
    :param formatter: Handler formatter.
    :type formatter: Formatter
    :return: Added handler.
    :rtype: Handler
    """

    logger = LOGGER if logger is None else logger
    file = tempfile.NamedTemporaryFile().name if file is None else file
    logging_file_handler = logging.FileHandler(file)
    logging_file_handler.setFormatter(formatter)
    logger.addHandler(logging_file_handler)
    return logging_file_handler
Adds a logging file handler to given logger or default logger using given file.

    :param logger: Logger to add the handler to.
    :type logger: Logger
    :param file: File to verbose into.
    :type file: unicode
    :param formatter: Handler formatter.
    :type formatter: Formatter
    :return: Added handler.
    :rtype: Handler