# IDurableLog&lt;T&gt;.ReadAsync(long, long, bool, LogDraftId?, CancellationToken)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.idurablelog-1/methods/)

```csharp
public abstract IAsyncEnumerable<LogEvent<T>> ReadAsync(long fromSequence = 0, long epoch = 0, bool includeDrafts = false, LogDraftId? resumeDraftId = null, CancellationToken cancellationToken = default(CancellationToken))
```

Reads the log's committed entries from a position, then waits for new entries.

### Parameters

- `fromSequence` (`long`): The sequence number of the first entry to read.
- `epoch` (`long`): The epoch of the history which `fromSequence` belongs to, from `Orleans.Durable.Journaling.LogEvent-1.Epoch`, or zero to read the current history. When the epoch differs from `Orleans.Durable.Journaling.IDurableLog-1.Epoch`, the stream begins with [LogEventKind](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.logeventkind/).
- `includeDrafts` (`bool`): Whether the stream also delivers draft events: [LogEventKind](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.logeventkind/), [LogEventKind](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.logeventkind/), and [LogEventKind](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.logeventkind/).
- `resumeDraftId` (`LogDraftId?`): The draft a reconnecting reader which includes drafts was viewing. When the draft is still open, the stream repeats its items from the beginning. When it committed, the stream reports [LogEventKind](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.logeventkind/) with the entries which replaced it, in any activation, while the log retains the first of those entries. When it closed in this activation without committing, the stream reports [LogEventKind](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.logeventkind/) with its [LogDraftAbandonReason](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.logdraftabandonreason/). Otherwise, the stream reports [LogDraftAbandonReason](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.logdraftabandonreason/) for a draft opened by another activation and [LogDraftAbandonReason](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.logdraftabandonreason/) for a draft of this activation.
- `cancellationToken` (`CancellationToken`): The token which ends the read.

### Returns

A stream of committed entries in sequence order. Each entry is delivered once the journal write which contains it is acknowledged. When `includeDrafts` is `true`, the stream also delivers draft items as they are written, and reports a committed draft once the entries which replaced it are durable.

### Exceptions

- `System.ArgumentOutOfRangeException`: `fromSequence` or `epoch` is negative.
- `System.InvalidOperationException`: Enumeration began before the owning manager recovered its state, or after a failed journal operation stopped it.
