# InMemoryLogBuffer.Log(LogLevel, EventId, TState, Exception?, Func&lt;TState, Exception?, string&gt;, string)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.logging.inmemorylogbuffer/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/Logging/InMemoryLoggerProvider.cs#L55-L68)

```csharp
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter, string category)
```

Logs a message to the buffer.

### Parameters

- `logLevel` (`LogLevel`)
- `eventId` (`EventId`)
- `state` (`TState`)
- `exception` (`Exception?`)
- `formatter` (`Func<TState, Exception?, string>`)
- `category` (`string`)
