def configure(logger=None, **kwargs):
    """Configures a logger, according to the following rules:

    * With no options set, enables ``INFO`` level on stderr if stderr is a TTY;
      otherwise enables ``INFO`` level to Syslog.

    * With ``syslog=`` and/or ``stderr=``, configures as specified.

    * With ``level=``, enables either Syslog or stderr logging according to
      whether or not stderr is a TTY, but uses the level specified.
    """
    configuration = Configuration.auto(**kwargs)
    if logger is None:
        logger = logging.getLogger()
    configuration(logger)