def get_log_attr( logline, attrname ):
    """
    Looks for 'attrname' in the list of fields 'logline'.  If found, the
    value for the attribute is returned, otherwise None.  For example, if

        logline = [ 'launch', 'file=/my/file' ]
        attrname = 'file'

    will return "/my/file".
    """
    pfx = attrname + '='
    for s in logline:
        try:
            if s.startswith(pfx):
                return s.split(pfx,1)[1]
        except:
            pass
    return None