# InMemoryLogger

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#L293)

```csharp
public sealed class InMemoryLogger : ILogger
```

A logger that writes to an in-memory buffer via the InMemoryLogBuffer.

## Constructors

- [InMemoryLogger(string, InMemoryLogBuffer)](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogger/constructors/constructor-string-orleans-testinghost-logging-inmemorylogbuffer-9e2f42cf/)

## Methods

- [BeginScope(TState)](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogger/methods/beginscope-1-tstate-c45c64f5/)
- [IsEnabled(LogLevel)](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogger/methods/isenabled-microsoft-extensions-logging-loglevel-0da3b72e/)
- [Log(LogLevel, EventId, TState, Exception?, Func&lt;TState, Exception?, string&gt;)](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogger/methods/log-1-microsoft-extensions-logging-loglevel-microsoft-extensions-logging-eventid-35e2b4f5/)
