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

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

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Orleans.TestingHost/Logging/FileLogger.cs#L68-L81)

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

Logs a message.

### Parameters

- `logLevel` (`LogLevel`): The log level.
- `eventId` (`EventId`): The event identifier.
- `state` (`TState`): The state.
- `exception` (`Exception?`): The exception.
- `formatter` (`Func<TState, Exception?, string>`): The formatter.
- `category` (`string`): The category.
