updated logging function for multi role_id