def parseLogfileToInstanceid(fname):
    """Parse a file name and return the integer instance id for the service."""
    if not fname.endswith(".log.txt") or "-" not in fname:
        return
    try:
        return int(fname[:-8].split("-")[-1])
    except ValueError:
        return