def get_primary_key_params(obj):
    """
    generate a dict from a mapped object suitable for formatting a primary key logline
    """
    params = {}
    for key in obj.__table__.primary_key.columns.keys():
        params[key] = getattr(obj, key)

    return params