transform logs into sessions