# InMemoryLogBuffer

Package: [Microsoft.Orleans.TestingHost](/orleans/docs/api/csharp/microsoft.orleans.testinghost/) 10.0.0

[NuGet package](https://www.nuget.org/packages/Microsoft.Orleans.TestingHost) | [Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/Logging/InMemoryLoggerProvider.cs#L20)

```csharp
public sealed class InMemoryLogBuffer
```

The in-memory log buffer which all [InMemoryLogger](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogger/) instances share. Useful for simulation testing where logs need to be captured and inspected.

## Remarks

Creates a new in-memory log buffer.

## Constructors

- [InMemoryLogBuffer](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/constructors/constructor-50f6f00d/)

## Properties

- [AllEntries](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/properties/allentries-a85d4944/)
- [ApproximateSizeBytes](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/properties/approximatesizebytes-971a732e/)
- [HasWarningsOrErrors](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/properties/haswarningsorerrors-a0a41d35/)

## Methods

- [AssertNoWarningsOrErrors](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/methods/assertnowarningsorerrors-6074ae75/)
- [Clear](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/methods/clear-e59cbcd6/)
- [FormatAllEntries](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/methods/formatallentries-b63d9aec/)
- [FormatAllEntriesWithSize](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/methods/formatallentrieswithsize-af1bdd0d/)
- [FormatEntries(LogLevel)](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/methods/formatentries-microsoft-extensions-logging-loglevel-85e134bb/)
- [FormatEntriesWithSize(LogLevel)](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/methods/formatentrieswithsize-microsoft-extensions-logging-loglevel-db376808/)
- [GetEntries(LogLevel)](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/methods/getentries-microsoft-extensions-logging-loglevel-21c207c2/)
- [HasEntriesAtOrAbove(LogLevel)](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/methods/hasentriesatorabove-microsoft-extensions-logging-loglevel-575f2eda/)
- [Log(LogLevel, EventId, TState, Exception?, Func&lt;TState, Exception?, string&gt;, string)](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/methods/log-1-microsoft-extensions-logging-loglevel-microsoft-extensions-logging-eventid-26035048/)
