Send log messages to the console.

    Parameters
    ----------
    level : int, optional
        An optional logging level that will apply only to this stream
        handler.
    fmt : str, optional
        An optional format string that will be used for the log
        messages.
    datefmt : str, optional
        An optional format string for formatting dates in the log
        messages.

def log_to_stream(level=None, fmt=None, datefmt=None):
    """
    Send log messages to the console.

    Parameters
    ----------
    level : int, optional
        An optional logging level that will apply only to this stream
        handler.
    fmt : str, optional
        An optional format string that will be used for the log
        messages.
    datefmt : str, optional
        An optional format string for formatting dates in the log
        messages.

    """
    _add_log_handler(
        logging.StreamHandler(), fmt=fmt, datefmt=datefmt, propagate=False)