# LibTmux.Server.GetMessagesAsync

- **Module:** LibTmux.Server
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Server.Administration.cs#L87
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-server-getmessagesasync/

```
LibTmux.Server.GetMessagesAsync(targetClient: string?, mode: ShowMessagesMode, cancellationToken: CancellationToken) -> Task<IReadOnlyList<string>>
```

Reads what the server has been logging.

## Parameters

- `targetClient` (string?): The client to read for, or null for the server.
- `mode` (ShowMessagesMode): Which log to read.
- `cancellationToken` (CancellationToken): Cancels the tmux command.

## Returns

One line per entry.
