# LibTmux.Server.GetMessagesAsync

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

tmux command: [`show-messages`](/en/tmux/latest/manual/show-messages/)

```
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.
