# PrimaryBasedLogViewAdaptor&lt;TLogView, TLogEntry, TSubmissionEntry&gt;.RetrieveLogSegment(int, int)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.common.primarybasedlogviewadaptor-3/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.common.primarybasedlogviewadaptor-3/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.EventSourcing/Common/PrimaryBasedLogViewAdaptor.cs#L85)

```csharp
public virtual Task<IReadOnlyList<TLogEntry>> PrimaryBasedLogViewAdaptor<TLogView, TLogEntry, RetrieveLogSegment(int fromVersion, int length)
```

Attempt to retrieve a segment of the log, possibly from storage. Throws `System.NotSupportedException` if the log cannot be read, which depends on the providers used and how they are configured.

### Parameters

- `fromVersion` (`int`): the start position
- `length` (`int`): the end position

### Returns

a
