import math


def log(*args):
    """ Evaluate a logarithm

    Args:
        *args (:obj:`list` of :obj:`float`): value optional proceeded by a base; otherwise the logarithm
            is calculated in base 10

    Returns:
        :obj:`float`
    """
    value = args[-1]
    if len(args) > 1:
        base = args[0]
    else:
        base = 10.

    return math.log(value, base)