import re


def shorten_url(url):
    """
    Return a URL which is shorter but still useful, for
    being displayed in logs

    >>> shorten_url("https://www.civicboom.com/i/like/bacon")
    '/i/like/bacon'

    doesn't affect urls that are already short:

    >>> shorten_url("/waffo/waffo")
    '/waffo/waffo'

    also set an absolute length limit
    >>> len(shorten_url("a"*1000))
    100
    """
    return re.sub("https?://[^/]+", "", url)[:100]